equal
deleted
inserted
replaced
46 myThreadId >>= |
46 myThreadId >>= |
47 \t -> (restore $ forkIO (clientSendLoop s t clChan ci) >> |
47 \t -> (restore $ forkIO (clientSendLoop s t clChan ci) >> |
48 listenLoop s chan ci >> return "Connection closed") |
48 listenLoop s chan ci >> return "Connection closed") |
49 `Exception.catch` (\(e :: Exception.IOException) -> return . B.pack . show $ e) |
49 `Exception.catch` (\(e :: Exception.IOException) -> return . B.pack . show $ e) |
50 `Exception.catch` (\(e :: ShutdownThreadException) -> return . B.pack . show $ e) |
50 `Exception.catch` (\(e :: ShutdownThreadException) -> return . B.pack . show $ e) |
|
51 `Exception.catch` (\(e :: Exception.SomeException) -> return . B.pack . show $ e) |
51 >>= clientOff >> remove |
52 >>= clientOff >> remove |
52 where |
53 where |
53 clientOff msg = writeChan chan $ ClientMessage (ci, ["QUIT", msg]) |
54 clientOff msg = writeChan chan $ ClientMessage (ci, ["QUIT", msg]) |
54 remove = writeChan chan $ Remove ci |
55 remove = writeChan chan $ Remove ci |
55 |
56 |