From 292ed2811da7e56b7246eed37b949b1c9132e6c3 Mon Sep 17 00:00:00 2001 From: Joe Crayne Date: Tue, 28 Jan 2020 01:51:35 -0500 Subject: Change netcrypto timeout to match toxcore. --- dht/src/Network/Tox/AggregateSession.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dht/src/Network/Tox/AggregateSession.hs b/dht/src/Network/Tox/AggregateSession.hs index c657f4d9..db6ff61c 100644 --- a/dht/src/Network/Tox/AggregateSession.hs +++ b/dht/src/Network/Tox/AggregateSession.hs @@ -153,7 +153,7 @@ keepAlive s q = do doEvent again now e = case e of DoTimeout -> do dput XNetCrypto $ "TIMEOUT: " ++ show (sSessionID s) sClose s - DoAlive -> re (now + 10) e doAlive >> again + DoAlive -> re (now + 8) e doAlive >> again DoRequestMissing -> re (now + 5{- toxcore uses 1sec -}) e doRequestMissing >> again fix $ \again -> do @@ -191,7 +191,7 @@ forkSession c s setStatus = forkIO $ do bump = do -- inPrint $ "BUMP: " ++ show (sSessionID s) now <- getPOSIXTime - atomically $ modifyTVar' q $ PSQ.insert (fromEnum DoTimeout) (now + 15) + atomically $ modifyTVar' q $ PSQ.insert (fromEnum DoTimeout) (now + 32) onPacket body loop Terminated = return () onPacket body loop (ParseError e) = inPrint e >> loop -- cgit v1.2.3