diff options
author | Joe Crayne <joe@jerkface.net> | 2020-01-03 18:22:16 -0500 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2020-01-07 13:24:59 -0500 |
commit | 15ab3290ad04280764968ba4760474a8c0cbfa52 (patch) | |
tree | 8df7bdfe38005f5478243427bb2b692d32843283 /dht/src/Network/Tox.hs | |
parent | b411ab66ceee7386e4829e2337c735a08fb3d54d (diff) |
Modify kademlia search to distinguish a Canceled from timed-out query.
Diffstat (limited to 'dht/src/Network/Tox.hs')
-rw-r--r-- | dht/src/Network/Tox.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dht/src/Network/Tox.hs b/dht/src/Network/Tox.hs index f17bad2c..f9f35ea4 100644 --- a/dht/src/Network/Tox.hs +++ b/dht/src/Network/Tox.hs | |||
@@ -349,7 +349,7 @@ newToxOverTransport keydb addr onNewSession (crypto,roster) udp tcp = do | |||
349 | -- TODO: Refactor so that these threads are forked when 'forkTox' is invoked. | 349 | -- TODO: Refactor so that these threads are forked when 'forkTox' is invoked. |
350 | -- This function should only initialize state. | 350 | -- This function should only initialize state. |
351 | orouter' <- forkRouteBuilder orouter | 351 | orouter' <- forkRouteBuilder orouter |
352 | $ \nid ni -> fmap (\(_,ns,_)->ns) | 352 | $ \nid ni -> fmap (\(_,ns,_)->ns) . resultToMaybe |
353 | <$> DHT.getNodes dhtclient (DHT.nodesOfInterest $ mkrouting dhtclient) nid (Multi.UDP ==> ni) | 353 | <$> DHT.getNodes dhtclient (DHT.nodesOfInterest $ mkrouting dhtclient) nid (Multi.UDP ==> ni) |
354 | 354 | ||
355 | toks <- do | 355 | toks <- do |