summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2014-02-26 15:42:15 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2014-02-26 15:42:15 +0400
commit63cda028ce38fd37bd3ee55f546b107f161af170 (patch)
tree449b72865ef57daae2bdb8544ac1f7d4ff5f36ed
parent2b19d54c3bb269ef8ce32a751d926191b85bddcf (diff)
s/TrackerNotResponding/TimeoutExpired
-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