This commit is contained in:
nek0 2024-10-31 21:01:53 +01:00
parent 71a760e054
commit 7e3a153c66

View file

@ -57,6 +57,7 @@ terminateGameOnSigint = do
putStrLn "SIGINT caught, terminating…" putStrLn "SIGINT caught, terminating…"
clients <- liftIO $ STM.atomically $ STM.readTMVar clientList clients <- liftIO $ STM.atomically $ STM.readTMVar clientList
disconnectClients clientList clients disconnectClients clientList clients
threadDelay (10 ^ 6)
close sock close sock
st <- STM.atomically $ STM.readTMVar serverState st <- STM.atomically $ STM.readTMVar serverState
void $ STM.atomically $ STM.swapTMVar serverState $ st void $ STM.atomically $ STM.swapTMVar serverState $ st