Anders Henriksson wrote:
> I try to make my program behave politely by releasing discarded
> server sockets. Unfortunately this never happens. [...]
AFAIK both GHC and your program are correct. Doing a netstat
immediately after your program terminates yields:
panne@marutea:~ > netstat -l
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 localhost:47004 localhost:1203 TIME_WAIT
"man netstat" tells me"
TIME_WAIT
The socket is waiting after close to handle packets still in
the network.
After a minute or so the port is free again. I'm not a TCP/IP guru,
but this seems to be the intended behaviour. The "socket" tool
(from Juergen Nickelsen <[EMAIL PROTECTED]>) behaves similarly.
Cheers,
Sven
--
Sven Panne Tel.: +49/89/2178-2235
LMU, Institut fuer Informatik FAX : +49/89/2178-2211
LFE Programmier- und Modellierungssprachen Oettingenstr. 67
mailto:[EMAIL PROTECTED] D-80538 Muenchen
http://www.informatik.uni-muenchen.de/~Sven.Panne