If you want a thread to do something you need a means to communicate with it. In this case (AFAICS -- I regret I did not have the patience to wade through the code you posted, partly because it was all over the place) you want the thread(s) either to give up or to reestablish connection.
You could use a shared variable that the thread(s) could check on a regular basis. (You could use a Thread::Queue or a Thread::Semaphore, but that's probably over the top.)
You may be able to use a signal, see thread-signalling, depending on version of perl etc.
In reply to Re: Non closing sockets - threads
by gone2015
in thread Non closing sockets - threads
by igor1212
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |