summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
280249d)
Therefore fixes hGetLine: illegal operation (handle is closed)
exceptions, because the handles were being closed whilst the listener
thread was still reading from them.
Fixes #66
serverAndListenerFinalizer tid = do
finally (timeout (messageTimeout config * 1^6)
(runSession' exitServer))
serverAndListenerFinalizer tid = do
finally (timeout (messageTimeout config * 1^6)
(runSession' exitServer))
- (cleanupProcess server >> killThread tid)
+ -- Make sure to kill the listener first, before closing
+ -- handles etc via cleanupProcess
+ (killThread tid >> cleanupProcess server)
(result, _) <- bracket serverListenerLauncher
serverAndListenerFinalizer
(result, _) <- bracket serverListenerLauncher
serverAndListenerFinalizer