# HG changeset patch
# User unc0rr
# Date 1225706130 0
# Node ID 08e98772235c9935b037b33647cc0ba854a4846c
# Parent  693db7cd6f253aeb9b0095fb4c22cc5bbfb5963c
Bring back old behavior

diff -r 693db7cd6f25 -r 08e98772235c netserver/hedgewars-server.hs
--- a/netserver/hedgewars-server.hs	Mon Nov 03 09:49:25 2008 +0000
+++ b/netserver/hedgewars-server.hs	Mon Nov 03 09:55:30 2008 +0000
@@ -61,7 +61,7 @@
 	unless (null recipients) $ putStrLn ("< " ++ (show answer))
 
 	clHandles' <- forM recipients $
-		\ch -> Control.Exception.handle (handleException ch) $ -- cannot just remove
+		\ch -> Control.Exception.handle (\e -> putStrLn ("handle exception: " ++ show e) >> if head answer == "BYE" then return [ch] else return []) $ -- cannot just remove
 			do
 			forM_ answer (\str -> hPutStrLn ch str)
 			hPutStrLn ch ""
@@ -73,15 +73,6 @@
 	sendAnswers answers client mclients rooms
 	where
 		remove list rmClHandles = deleteFirstsBy2t (\ a b -> (Miscutils.handle a) == b) list rmClHandles
-		handleException ch e = do
-			putStrLn ("handle exception: " ++ show e)
-			handleInfo <- hShow ch
-			putStrLn ("handle info: " ++ handleInfo)
-			
-			cl <- hIsClosed ch
-			unless cl (hClose ch)
-			
-			if head answer == "BYE" then return [ch] else return []
 
 
 reactCmd :: [String] -> ClientInfo -> [ClientInfo] -> [RoomInfo] -> IO ([ClientInfo], [RoomInfo])