summaryrefslogtreecommitdiff
path: root/src/Network/Tox/DHT
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/Tox/DHT')
-rw-r--r--src/Network/Tox/DHT/Handlers.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Network/Tox/DHT/Handlers.hs b/src/Network/Tox/DHT/Handlers.hs
index 60c0500c..6bbcfb43 100644
--- a/src/Network/Tox/DHT/Handlers.hs
+++ b/src/Network/Tox/DHT/Handlers.hs
@@ -264,9 +264,7 @@ cookieRequest crypto client localUserKey addr = do
264 return mp 264 return mp
265 let cookieSerializer 265 let cookieSerializer
266 = MethodSerializer 266 = MethodSerializer
267 { methodTimeout = \tid addr -> do 267 { methodTimeout = \tid addr -> return (addr, 5000000)
268 modifyTVar (pendingCookies crypto) decAddr
269 return (addr, 5000000)
270 , method = CookieRequestType 268 , method = CookieRequestType
271 , wrapQuery = \tid src dst cr -> DHTCookieRequest $ wrapAsymm tid src dst (, cr) 269 , wrapQuery = \tid src dst cr -> DHTCookieRequest $ wrapAsymm tid src dst (, cr)
272 , unwrapResponse = fmap snd . unCookie 270 , unwrapResponse = fmap snd . unCookie
@@ -274,6 +272,7 @@ cookieRequest crypto client localUserKey addr = do
274 cookieRequest = CookieRequest localUserKey 272 cookieRequest = CookieRequest localUserKey
275 hPutStrLn stderr $ show addr ++ " <-- cookieRequest" 273 hPutStrLn stderr $ show addr ++ " <-- cookieRequest"
276 reply <- QR.sendQuery client cookieSerializer cookieRequest addr 274 reply <- QR.sendQuery client cookieSerializer cookieRequest addr
275 atomically $ modifyTVar (pendingCookies crypto) decAddr
277 hPutStrLn stderr $ show addr ++ " -cookieResponse-> " ++ show reply 276 hPutStrLn stderr $ show addr ++ " -cookieResponse-> " ++ show reply
278 return $ join reply 277 return $ join reply
279 278