diff options
author | Joe Crayne <joe@jerkface.net> | 2020-01-03 17:12:14 -0500 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2020-01-03 17:26:06 -0500 |
commit | 5181c77ce7dd73d622ff3921b90bf2741bedb646 (patch) | |
tree | 16ba93b83ad0c137a013e47f593d7d40ace68ce6 /dht/src/Network/Tox/Onion/Handlers.hs | |
parent | 31b799222cb76cd0002d9a3cc5b340a7b6fed139 (diff) |
QueryResponse: Use three-way sum to distinguish Canceled and Timedout.
Diffstat (limited to 'dht/src/Network/Tox/Onion/Handlers.hs')
-rw-r--r-- | dht/src/Network/Tox/Onion/Handlers.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dht/src/Network/Tox/Onion/Handlers.hs b/dht/src/Network/Tox/Onion/Handlers.hs index 65ec846c..fa7bc83c 100644 --- a/dht/src/Network/Tox/Onion/Handlers.hs +++ b/dht/src/Network/Tox/Onion/Handlers.hs | |||
@@ -285,7 +285,7 @@ sendOnion getTimeout client req oaddr unwrap = | |||
285 | forM_ mb $ \r -> dput XAnnounce $ show (onionNodeInfo oaddr) ++ " sent response: " ++ show r | 285 | forM_ mb $ \r -> dput XAnnounce $ show (onionNodeInfo oaddr) ++ " sent response: " ++ show r |
286 | maybe (if n>0 then loop $! n - 1 else return Nothing) | 286 | maybe (if n>0 then loop $! n - 1 else return Nothing) |
287 | (return . Just . unwrap (onionNodeInfo oaddr)) | 287 | (return . Just . unwrap (onionNodeInfo oaddr)) |
288 | $ join mb | 288 | $ join $ resultToMaybe mb |
289 | 289 | ||
290 | 290 | ||
291 | -- | Lookup the secret counterpart for a given alias key. | 291 | -- | Lookup the secret counterpart for a given alias key. |