diff options
author | joe <joe@jerkface.net> | 2017-07-25 22:09:22 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2017-07-25 22:09:22 -0400 |
commit | 480088a97f9622b7bb56978f3596e87ee7c770a0 (patch) | |
tree | 589e54752bc98d368bbbc74d52ff1514fb32c4ae /src/Network/DHT | |
parent | 4060c2c717eeac95dd16f9222184d6b4e998cb7f (diff) |
pattern fail
Diffstat (limited to 'src/Network/DHT')
-rw-r--r-- | src/Network/DHT/Routing.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Network/DHT/Routing.hs b/src/Network/DHT/Routing.hs index 63ff46c7..0391c116 100644 --- a/src/Network/DHT/Routing.hs +++ b/src/Network/DHT/Routing.hs | |||
@@ -327,6 +327,7 @@ updateBucketForPingResult bad_node got_response bucket | |||
327 | where | 327 | where |
328 | (top, popped) = runIdentity $ popFront bucketQ (bktQ bucket) | 328 | (top, popped) = runIdentity $ popFront bucketQ (bktQ bucket) |
329 | 329 | ||
330 | -- Dropped from accepted, replaced by pending. | ||
330 | replacements | got_response = [] -- Timestamp was already updated by TryInsert. | 331 | replacements | got_response = [] -- Timestamp was already updated by TryInsert. |
331 | | Just info <- top = do | 332 | | Just info <- top = do |
332 | -- Insert only if there's a removal. | 333 | -- Insert only if there's a removal. |
@@ -334,7 +335,9 @@ updateBucketForPingResult bad_node got_response bucket | |||
334 | return (bad_node, info) | 335 | return (bad_node, info) |
335 | | otherwise = [] | 336 | | otherwise = [] |
336 | 337 | ||
338 | -- Dropped from the pending queue without replacing. | ||
337 | forgotten | got_response = maybeToList $ fmap snd top | 339 | forgotten | got_response = maybeToList $ fmap snd top |
340 | | otherwise = [] | ||
338 | 341 | ||
339 | 342 | ||
340 | replace (bad_node, (tm, info)) = | 343 | replace (bad_node, (tm, info)) = |