summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2024-08-11 20:49:09 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2024-08-11 20:49:09 +0200
commit5b1f292bc3b31fe1bdfcfafac3940880c8d7887b (patch)
tree3e07a6a53a6d82afea8f586d960d85a4f81b6474
parentba89803397cff3631423c3ccd6c2c473b1c8b8fe (diff)
Network: clear keep-alive timeout when sending to avoid loop
-rw-r--r--src/Erebos/Network/Protocol.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Erebos/Network/Protocol.hs b/src/Erebos/Network/Protocol.hs
index d759994..ded0b05 100644
--- a/src/Erebos/Network/Protocol.hs
+++ b/src/Erebos/Network/Protocol.hs
@@ -891,6 +891,7 @@ processOutgoing gs@GlobalState {..} = do
now <- readTVar gNowVar
if next <= now
then do
+ writeTVar cNextKeepAlive Nothing
identity <- fst <$> readTVar gIdentity
let header = TransportHeader [ AnnounceSelf $ refDigest $ storedRef $ idData identity ]
writeTQueue cSecureOutQueue (EncryptedOnly, TransportPacket header [], [])