Catch all exceptions in clientSendLoop. If there could something besides IOException be thrown there, that would explain ping timeouts server issue.
--- 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