From 13045c4ba9be84b1d37dbb73a73e6da88bc94df3 Mon Sep 17 00:00:00 2001 From: nek0 Date: Wed, 1 May 2024 03:37:10 +0200 Subject: [PATCH] fixing pings! --- src-server/Server/Communication.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src-server/Server/Communication.hs b/src-server/Server/Communication.hs index 6733bd0..7d49623 100644 --- a/src-server/Server/Communication.hs +++ b/src-server/Server/Communication.hs @@ -336,7 +336,7 @@ sendPings = do put stateContainer else do random <- liftIO nextRandom - let newPong = (lastPongTime, random) + let newPong = (now, random) liftIO $ sendMessage ( Ping random ) @@ -348,6 +348,6 @@ sendPings = do otherPlayers = filter (\a -> playerId a /= plId) players liftIO $ void $ STM.atomically $ STM.swapTMVar (scPlayers stateContainer) (newPlayer : otherPlayers) - put stateContainer ) players + put stateContainer