summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/Tracker/RPC/UDP.hs
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2014-02-21 22:52:41 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2014-02-21 22:52:41 +0400
commitc0284a86b4982af2249530190326af4cecfc6d3e (patch)
tree591ea76ece706262bf0f2c7b2f2a5fd211203452 /src/Network/BitTorrent/Tracker/RPC/UDP.hs
parent7be32f085a25f847b6eb07a085b4db8b3d3f6da3 (diff)
Do not allow to abort transaction finalization
Diffstat (limited to 'src/Network/BitTorrent/Tracker/RPC/UDP.hs')
-rw-r--r--src/Network/BitTorrent/Tracker/RPC/UDP.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Network/BitTorrent/Tracker/RPC/UDP.hs b/src/Network/BitTorrent/Tracker/RPC/UDP.hs
index 499b6d37..6bd22787 100644
--- a/src/Network/BitTorrent/Tracker/RPC/UDP.hs
+++ b/src/Network/BitTorrent/Tracker/RPC/UDP.hs
@@ -377,7 +377,7 @@ allocTransaction Manager {..} addr ares = modifyMVar pendingResps bindId
377 377
378commitTransaction :: Manager -> SockAddr -> TransactionId -> Response -> IO () 378commitTransaction :: Manager -> SockAddr -> TransactionId -> Response -> IO ()
379commitTransaction Manager {..} addr tid resp = 379commitTransaction Manager {..} addr tid resp =
380 modifyMVar_ pendingResps $ \ m -> do 380 modifyMVarMasked_ pendingResps $ \ m -> do
381 case M.lookup tid =<< M.lookup addr m of 381 case M.lookup tid =<< M.lookup addr m of
382 Nothing -> return m -- tracker responded after 'cancelTransaction' fired 382 Nothing -> return m -- tracker responded after 'cancelTransaction' fired
383 Just ares -> do 383 Just ares -> do
@@ -392,7 +392,7 @@ commitTransaction Manager {..} addr tid resp =
392 392
393cancelTransaction :: Manager -> SockAddr -> TransactionId -> IO () 393cancelTransaction :: Manager -> SockAddr -> TransactionId -> IO ()
394cancelTransaction Manager {..} addr tid = 394cancelTransaction Manager {..} addr tid =
395 modifyMVar_ pendingResps $ \m -> 395 modifyMVarMasked_ pendingResps $ \m ->
396 return $ M.update deleteId addr m 396 return $ M.update deleteId addr m
397 where 397 where
398 deleteId m 398 deleteId m