Re: accept() never returns, just hangs after calling it



you should close you clientSocket before another accept.
or use a new empty socket.

.