summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/Tracker
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/BitTorrent/Tracker')
-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 dfa8c968..f057597c 100644
--- a/src/Network/BitTorrent/Tracker/RPC/UDP.hs
+++ b/src/Network/BitTorrent/Tracker/RPC/UDP.hs
@@ -164,7 +164,7 @@ data RpcException
164 | HostLookupFailed 164 | HostLookupFailed
165 165
166 -- | Tracker exists but not responding for specific number of seconds. 166 -- | Tracker exists but not responding for specific number of seconds.
167 | TrackerNotResponding Int 167 | TimeoutExpired Int
168 168
169 -- | Tracker responded with unexpected message type. 169 -- | Tracker responded with unexpected message type.
170 | UnexpectedResponse 170 | UnexpectedResponse
@@ -517,7 +517,7 @@ retransmission :: Options -> IO a -> IO a
517retransmission Options {..} action = go optMinTimeout 517retransmission Options {..} action = go optMinTimeout
518 where 518 where
519 go curTimeout 519 go curTimeout
520 | curTimeout > optMaxTimeout = throwIO $ TrackerNotResponding curTimeout 520 | curTimeout > optMaxTimeout = throwIO $ TimeoutExpired curTimeout
521 | otherwise = do 521 | otherwise = do
522 r <- timeout curTimeout action 522 r <- timeout curTimeout action
523 maybe (go (2 * curTimeout)) return r 523 maybe (go (2 * curTimeout)) return r