From 6ebe91b686ca8bef893f9a3dd704e45c04124b8f Mon Sep 17 00:00:00 2001 From: Joe Crayne Date: Wed, 16 Jan 2019 22:53:41 -0500 Subject: kademlia: support for async search queries. --- src/Network/Tox/DHT/Handlers.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Network/Tox/DHT') diff --git a/src/Network/Tox/DHT/Handlers.hs b/src/Network/Tox/DHT/Handlers.hs index afdf2cc3..abd607c3 100644 --- a/src/Network/Tox/DHT/Handlers.hs +++ b/src/Network/Tox/DHT/Handlers.hs @@ -194,7 +194,7 @@ newRouting addr crypto update4 update6 = do nullSearch = Search { searchSpace = toxSpace , searchNodeAddress = nodeIP &&& nodePort - , searchQuery = \_ _ -> return Nothing + , searchQuery = Left $ \_ _ -> return Nothing , searchAlpha = 1 , searchK = 2 } @@ -525,7 +525,7 @@ nodeSearch :: Client -> TVar (HashMap NodeId [NodeInfoCallback]) -> Search NodeI nodeSearch client cbvar = Search { searchSpace = toxSpace , searchNodeAddress = nodeIP &&& nodePort - , searchQuery = getNodes client cbvar + , searchQuery = Left $ getNodes client cbvar , searchAlpha = 8 , searchK = 16 -- cgit v1.2.3