diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Network/BitTorrent/Tracker/RPC/UDP.hs | 4 |
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 | ||
378 | commitTransaction :: Manager -> SockAddr -> TransactionId -> Response -> IO () | 378 | commitTransaction :: Manager -> SockAddr -> TransactionId -> Response -> IO () |
379 | commitTransaction Manager {..} addr tid resp = | 379 | commitTransaction 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 | ||
393 | cancelTransaction :: Manager -> SockAddr -> TransactionId -> IO () | 393 | cancelTransaction :: Manager -> SockAddr -> TransactionId -> IO () |
394 | cancelTransaction Manager {..} addr tid = | 394 | cancelTransaction 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 |