Site icon ivucica blog

close() of listening socket from another thread

Just a warning.

Calling close() on listening socket in another thread will NOT prevent another connection from being made. Instead, you must call shutdown(). This should abort existing select() calls (probably accept() too, but I didn’t try).

Guess how I found out 🙂


via blog.vucica.net