Catch all exceptions in clientSendLoop. If there could something besides IOException be thrown there, that would explain ping timeouts server issue.
authorunc0rr
Fri, 13 Jul 2012 13:21:52 +0400
changeset 7388 92535bc7e928
parent 7385 4acb5c021cb9
child 7389 15c3fb4882df
child 7390 27bfd8bbde7e
Catch all exceptions in clientSendLoop. If there could something besides IOException be thrown there, that would explain ping timeouts server issue.
gameServer/ClientIO.hs
--- a/gameServer/ClientIO.hs	Fri Jul 13 01:07:53 2012 +0400
+++ b/gameServer/ClientIO.hs	Fri Jul 13 13:21:52 2012 +0400
@@ -66,12 +66,11 @@
         killReciever . B.unpack $ quitMessage answer
 
     Exception.handle
-        (\(e :: Exception.IOException) -> unless (isQuit answer) . killReciever $ show e) $
+        (\(e :: Exception.SomeException) -> unless (isQuit answer) . killReciever $ show e) $
             sendAll s $ B.unlines answer `B.snoc` '\n'
 
     if isQuit answer then
-        do
-        Exception.handle (\(_ :: Exception.IOException) -> putStrLn "error on sClose") $ sClose s
+        sClose s
         else
         clientSendLoop s tId chan ci