
4 Jun
2010
4 Jun
'10
6:59 p.m.
Hi all, I've been writing some server code like the following: Control.Exception.bracketOnError (listenOn port) sClose procRequests Sometimes I run this server in GHCI and interrupt it with C-c. But when I try and rerun the server it tells me that the port is already bound meaning that sClose either doesn't get called or doesn't complete. Terminating the interpreter seems to work. Is there a better way to correctly stop listening on a port? -deech