diff options
Diffstat (limited to 'src/Network/Tox/Crypto/Handlers.hs')
-rw-r--r-- | src/Network/Tox/Crypto/Handlers.hs | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/Network/Tox/Crypto/Handlers.hs b/src/Network/Tox/Crypto/Handlers.hs index ea5c0f98..356ddf24 100644 --- a/src/Network/Tox/Crypto/Handlers.hs +++ b/src/Network/Tox/Crypto/Handlers.hs | |||
@@ -753,15 +753,9 @@ runUponHandshake netCryptoSession0 addr pktoq = do | |||
753 | labelThread tid ("NetCryptoRequest." ++ show (key2id remotePublicKey) ++ sidStr) | 753 | labelThread tid ("NetCryptoRequest." ++ show (key2id remotePublicKey) ++ sidStr) |
754 | fix $ \loop -> do | 754 | fix $ \loop -> do |
755 | atomically (readTVar (ncRequestInterval netCryptoSession0)) >>= threadDelay | 755 | atomically (readTVar (ncRequestInterval netCryptoSession0)) >>= threadDelay |
756 | result <- atomically $ PQ.dequeueOrGetMissing pktq | 756 | nums <- atomically $ PQ.getMissing pktq |
757 | case result of | 757 | dput XNetCrypto $ "(Request Thread) Missing Packets detected:" ++ show nums |
758 | Right cd -> do | 758 | dput XNetCrypto $ "TODO: compose PacketRequest message and send it." |
759 | dput XNetCrypto $ "Dequeued(Request Thread)::" ++ show (bufferData cd) ++ " now running hook..." | ||
760 | _ <- runCryptoHook netCryptoSession0 (bufferData cd) | ||
761 | return () | ||
762 | Left nums -> do | ||
763 | dput XNetCrypto $ "(Request Thread) Missing Packets detected:" ++ show nums | ||
764 | dput XNetCrypto $ "TODO: compose PacketRequest message and send it." | ||
765 | loop | 759 | loop |
766 | dput XNetCrypto $ "runUponHandshake: " ++ show threadid ++ " = NetCryptoRequest." ++ show (key2id remotePublicKey) ++ sidStr | 760 | dput XNetCrypto $ "runUponHandshake: " ++ show threadid ++ " = NetCryptoRequest." ++ show (key2id remotePublicKey) ++ sidStr |
767 | -- launch dequeueOutgoing thread | 761 | -- launch dequeueOutgoing thread |