Catch all types of exceptions in recv thread. Should probably help with ghosts problem, though I have no idea which else kind of exception could arise there.
authorunc0rr
Sun, 17 Jun 2012 00:08:20 +0400
changeset 7252 74a92f39703b
parent 7250 304d3d98662e
child 7254 aa4461ec7737
Catch all types of exceptions in recv thread. Should probably help with ghosts problem, though I have no idea which else kind of exception could arise there.
gameServer/ClientIO.hs
--- a/gameServer/ClientIO.hs	Thu Jun 14 16:35:36 2012 +0400
+++ b/gameServer/ClientIO.hs	Sun Jun 17 00:08:20 2012 +0400
@@ -48,6 +48,7 @@
         listenLoop s chan ci >> return "Connection closed")
         `Exception.catch` (\(e :: Exception.IOException) -> return . B.pack . show $ e)
         `Exception.catch` (\(e :: ShutdownThreadException) -> return . B.pack . show $ e)
+        `Exception.catch` (\(e :: Exception.SomeException) -> return . B.pack . show $ e)
         >>= clientOff >> remove
     where
         clientOff msg = writeChan chan $ ClientMessage (ci, ["QUIT", msg])