From 25a12f1fd90c016424a4e017da28f7645240dfb3 Mon Sep 17 00:00:00 2001 From: James Crayne Date: Thu, 31 May 2018 16:31:29 +0000 Subject: need to actually send handshake --- src/Network/Tox.hs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/Network') diff --git a/src/Network/Tox.hs b/src/Network/Tox.hs index c3e559d7..c13c3b1a 100644 --- a/src/Network/Tox.hs +++ b/src/Network/Tox.hs @@ -325,11 +325,12 @@ netCryptoWithBackoff millisecs tox myseckey theirpubkey = do } newsession <- generateSecretKey timestamp <- getPOSIXTime - -- (myhandshakeData,launchThreads) <- - _ <- atomically $ freshCryptoSession (toxCryptoSessions tox) saddr newsession timestamp hp - -- launchThreads - -- forM myhandshake $ \response_handshake -> do - -- sendHandshake sessions addr response_handshake + (myhandshake,ioAction) + <- atomically $ freshCryptoSession (toxCryptoSessions tox) saddr newsession timestamp hp + ioAction + -- send handshake + forM myhandshake $ \response_handshake -> do + sendHandshake (toxCryptoSessions tox) saddr response_handshake let secnum :: Double secnum = fromIntegral millisecs / 1000000 delay = (millisecs * 5 `div` 4) -- cgit v1.2.3