Menu

#14 can't bind port on server restart

open
nobody
None
5
2011-01-01
2011-01-01
max
No

after an admin restart (via web interface), on Mac OS X 10.5 tunnel, port remains in TIME_WAIT status and server quits with bind error (port already in use)

solved putting

if (!setsockopt($_[0], SOL_SOCKET, SO_REUSEADDR, 1)) {$p=$!; close $_[0]; return "Can't set socket option to SO_REUSEADDR: $p";}

in openserverport, after socket() and before bind()

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.