Make server stay alive when some clients get kicked
authorunc0rr
Mon, 19 Jul 2010 23:38:18 +0400
changeset 3658 113cb9345be1
parent 3657 fa3bf50d0338
child 3659 f8d5ac50e307
Make server stay alive when some clients get kicked
gameServer/Actions.hs
--- a/gameServer/Actions.hs	Mon Jul 19 23:31:08 2010 +0400
+++ b/gameServer/Actions.hs	Mon Jul 19 23:38:18 2010 +0400
@@ -416,8 +416,8 @@
 
 processAction PingAll = do
     rnc <- gets roomsClients
+    liftIO (allClientsM rnc) >>= mapM_ (kickTimeouted rnc)
     cis <- liftIO $ allClientsM rnc
-    mapM_ (kickTimeouted rnc) $ cis
     chans <- liftIO $ mapM (client'sM rnc sendChan) cis
     liftIO $ mapM_ (modifyClient rnc (\cl -> cl{pingsQueue = pingsQueue cl + 1})) cis
     processAction $ AnswerClients chans ["PING"]