gameServer/ClientIO.hs
changeset 5011 73c5839d4447
parent 5001 312f4dd41753
child 5012 8767878e08e2
--- a/gameServer/ClientIO.hs	Sun Mar 13 20:34:27 2011 +0300
+++ b/gameServer/ClientIO.hs	Mon Mar 14 20:04:51 2011 +0300
@@ -46,10 +46,8 @@
         sendPacket packet = writeChan chan $ ClientMessage (ci, packet)
 
 clientRecvLoop :: Socket -> Chan CoreMessage -> ClientIndex -> IO ()
-clientRecvLoop s chan ci = Exception.block $
-        ((Exception.unblock $ listenLoop s chan ci >> return "Connection closed") `catch` (return . B.pack . show) >>= clientOff)
-    `Exception.finally`
-        remove
+clientRecvLoop s chan ci =
+        (Exception.unblock $ listenLoop s chan ci >> return "Connection closed") `catch` (return . B.pack . show) >>= clientOff >> remove
     where
         clientOff msg = writeChan chan $ ClientMessage (ci, ["QUIT", msg])
         remove = writeChan chan $ Remove ci