in reply to Re^3: Non closing sockets - threads
in thread Non closing sockets - threads

I thought the OP problem was how to kill off the threads in the event of losing connection to the server, so that everything could be restarted again.

No the OP is detaching the threads, so they will simply evaporate when the thread procs "fall off the end" when the while( <$lclient> ) { loops detects that the client has disconnected. (returns undef).

The problem appears to be that the disconnected sockets are remaining active after the threads have gone away--probably due to there being multiple handles in existance that are not being cleaned up properly.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."