From 688450c2d9998db7b4389dc9642d219774c23857 Mon Sep 17 00:00:00 2001 From: Joe Crayne Date: Sun, 16 Dec 2018 13:51:02 -0500 Subject: More TCP work. --- ToxManager.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ToxManager.hs') diff --git a/ToxManager.hs b/ToxManager.hs index 01403d9d..dceb9210 100644 --- a/ToxManager.hs +++ b/ToxManager.hs @@ -115,8 +115,8 @@ toxman ssvar announcer toxbkts tox presence = ToxManager if not (Map.null rs) then return (acnt,Nothing) else return (acnt,Just $ \nid -> foldr interweave [] - . map (R.kclosest (searchSpace (toxQSearch tox)) - searchK + . map (R.kclosest (searchSpace $ toxQSearch tox) + (searchK $ toxQSearch tox) nid) <$> mapM (readTVar . snd) toxbkts) @@ -575,7 +575,7 @@ nearNodes tox nid = do bkts6 <- readTVar $ routing6 $ toxRouting tox let nss = map - (R.kclosest (searchSpace (toxQSearch tox)) searchK nid) + (R.kclosest (searchSpace $ toxQSearch tox) (searchK $ toxQSearch tox) nid) [bkts4, bkts6] return $ foldr interweave [] nss @@ -591,7 +591,7 @@ startConnecting0 tx them contact reason = do let nearNodes nid = do bkts4 <- readTVar $ routing4 $ toxRouting tox bkts6 <- readTVar $ routing6 $ toxRouting tox - let nss = map (R.kclosest (searchSpace (toxQSearch tox)) searchK nid) + let nss = map (R.kclosest (searchSpace $ toxQSearch tox) (searchK $ toxQSearch tox) nid) [bkts4,bkts6] return $ foldr interweave [] nss wanted <- atomically $ (==Just TryingToConnect) <$> readTVar (contactPolicy contact) -- cgit v1.2.3