--- a/gameServer/ClientIO.hs Sat Mar 12 22:42:01 2011 +0300
+++ b/gameServer/ClientIO.hs Sat Mar 12 22:55:25 2011 +0300
@@ -66,11 +66,14 @@
if isQuit answer then
do
Exception.handle (\(_ :: Exception.IOException) -> putStrLn "error on sClose") $ sClose s
- killReciever "Connection closed"
+ killReciever . B.unpack $ quitMessage answer
else
clientSendLoop s tId cChan chan ci
where
killReciever = Exception.throwTo tId . ShutdownThreadException
+ quitMessage ["BYE"] = "bye"
+ quitMessage ("BYE":msg:_) = msg
+ quitMessage _ = error "quitMessage"
isQuit ("BYE":_) = True
isQuit _ = False
--- a/gameServer/CoreTypes.hs Sat Mar 12 22:42:01 2011 +0300
+++ b/gameServer/CoreTypes.hs Sat Mar 12 22:55:25 2011 +0300
@@ -210,5 +210,5 @@
deriving Typeable
instance Show ShutdownThreadException where
- show (ShutdownThreadException s) = "kill: " ++ s
+ show (ShutdownThreadException s) = s
instance Exception ShutdownThreadException