diff options
author | James Crayne <jim.crayne@gmail.com> | 2018-05-30 07:50:09 +0000 |
---|---|---|
committer | James Crayne <jim.crayne@gmail.com> | 2018-05-30 07:59:49 +0000 |
commit | 93ab4c12d244a74540b987878d94abf75cdb43d1 (patch) | |
tree | e81e62c98184846593706e8239bef35ee6448591 | |
parent | 5bdb2e12b5cb0159f2fa0cb80e01c06e37a1737c (diff) |
runCryptoHook only in dqueue thread for lossless
-rw-r--r-- | src/Network/Tox/Crypto/Handlers.hs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Network/Tox/Crypto/Handlers.hs b/src/Network/Tox/Crypto/Handlers.hs index 2a28adc5..2f8b059a 100644 --- a/src/Network/Tox/Crypto/Handlers.hs +++ b/src/Network/Tox/Crypto/Handlers.hs | |||
@@ -723,8 +723,7 @@ cryptoNetHandler sessions addr (NetCrypto (CryptoPacket nonce16 encrypted)) = do | |||
723 | runCryptoHook session (bufferData cd) | 723 | runCryptoHook session (bufferData cd) |
724 | else do dput XNetCrypto "enqueue ncPacketQueue Lossless" | 724 | else do dput XNetCrypto "enqueue ncPacketQueue Lossless" |
725 | atomically $ PQ.enqueue ncPacketQueue bufferEnd cd | 725 | atomically $ PQ.enqueue ncPacketQueue bufferEnd cd |
726 | runCryptoHook session (bufferData cd) | 726 | return Nothing |
727 | -- return Nothing | ||
728 | where | 727 | where |
729 | last2Bytes :: Nonce24 -> Word16 | 728 | last2Bytes :: Nonce24 -> Word16 |
730 | last2Bytes (Nonce24 bs) = case S.decode (B.drop 22 bs) of | 729 | last2Bytes (Nonce24 bs) = case S.decode (B.drop 22 bs) of |