summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Crayne <joe@jerkface.net>2020-01-28 01:51:35 -0500
committerJoe Crayne <joe@jerkface.net>2020-01-28 17:26:25 -0500
commit292ed2811da7e56b7246eed37b949b1c9132e6c3 (patch)
tree99a0f47122cf420fa8678789559eb6ec622b0d9d
parent6339073a292cac1885f75b659b533ccb294a08bc (diff)
Change netcrypto timeout to match toxcore.
-rw-r--r--dht/src/Network/Tox/AggregateSession.hs4
1 files 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
153 doEvent again now e = case e of 153 doEvent again now e = case e of
154 DoTimeout -> do dput XNetCrypto $ "TIMEOUT: " ++ show (sSessionID s) 154 DoTimeout -> do dput XNetCrypto $ "TIMEOUT: " ++ show (sSessionID s)
155 sClose s 155 sClose s
156 DoAlive -> re (now + 10) e doAlive >> again 156 DoAlive -> re (now + 8) e doAlive >> again
157 DoRequestMissing -> re (now + 5{- toxcore uses 1sec -}) e doRequestMissing >> again 157 DoRequestMissing -> re (now + 5{- toxcore uses 1sec -}) e doRequestMissing >> again
158 158
159 fix $ \again -> do 159 fix $ \again -> do
@@ -191,7 +191,7 @@ forkSession c s setStatus = forkIO $ do
191 bump = do 191 bump = do
192 -- inPrint $ "BUMP: " ++ show (sSessionID s) 192 -- inPrint $ "BUMP: " ++ show (sSessionID s)
193 now <- getPOSIXTime 193 now <- getPOSIXTime
194 atomically $ modifyTVar' q $ PSQ.insert (fromEnum DoTimeout) (now + 15) 194 atomically $ modifyTVar' q $ PSQ.insert (fromEnum DoTimeout) (now + 32)
195 195
196 onPacket body loop Terminated = return () 196 onPacket body loop Terminated = return ()
197 onPacket body loop (ParseError e) = inPrint e >> loop 197 onPacket body loop (ParseError e) = inPrint e >> loop