netserver/hedgewars-server.hs
changeset 1511 a5bafdafb394
parent 1510 98c5799c851b
child 1513 a35c90263e27
--- a/netserver/hedgewars-server.hs	Mon Nov 24 21:46:32 2008 +0000
+++ b/netserver/hedgewars-server.hs	Mon Nov 24 21:47:59 2008 +0000
@@ -1,4 +1,4 @@
-{-# LANGUAGE CPP, PatternSignatures #-}
+{-# LANGUAGE CPP, ScopedTypeVariables #-}
 
 module Main where
 
@@ -39,11 +39,11 @@
 socketCloseLoop :: TChan Handle -> IO()
 socketCloseLoop closingChan = forever $ do
 	h <- atomically $ readTChan closingChan
-	Control.Exception.handle (\(_ :: Exception) -> putStrLn "error on hClose") $ hClose h
+	Control.Exception.handle (\(_ :: IOException) -> putStrLn "error on hClose") $ hClose h
 
 acceptLoop :: Socket -> TChan ClientInfo -> IO ()
 acceptLoop servSock acceptChan =
-	Control.Exception.handle (\(_ :: Exception) -> putStrLn "exception on connect" >> acceptLoop servSock acceptChan) $
+	Control.Exception.handle (\(_ :: IOException) -> putStrLn "exception on connect" >> acceptLoop servSock acceptChan) $
 	do
 	(cHandle, host, _) <- accept servSock
 	
@@ -83,7 +83,7 @@
 
 	clHandles' <- forM recipients $
 		\ch -> Control.Exception.handle
-			(\(e :: Exception) -> if head answer == "BYE" then
+			(\(e :: IOException) -> if head answer == "BYE" then
 					return [ch]
 				else
 					atomically $ writeTChan (chan $ fromJust $ clientByHandle ch clients) ["QUIT", show e] >> return []  -- cannot just remove