--- 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