equal
deleted
inserted
replaced
49 clientRecvLoop s chan ci = |
49 clientRecvLoop s chan ci = |
50 do |
50 do |
51 msg <- (listenLoop s chan ci >> return "Connection closed") `catch` (return . B.pack . show) |
51 msg <- (listenLoop s chan ci >> return "Connection closed") `catch` (return . B.pack . show) |
52 clientOff msg |
52 clientOff msg |
53 `Exception.finally` |
53 `Exception.finally` |
|
54 do |
|
55 clientOff "Connection closed ()" |
54 remove |
56 remove |
55 where |
57 where |
56 clientOff msg = writeChan chan $ ClientMessage (ci, ["QUIT", msg]) |
58 clientOff msg = writeChan chan $ ClientMessage (ci, ["QUIT", msg]) |
57 remove = writeChan chan $ Remove ci |
59 remove = writeChan chan $ Remove ci |
58 |
60 |