note
Alex the Serb
I had similar problem using <code>IO::Socket</code>, my script would just hang without finishing.
Than sometime, when maintenance changes cables or hubs, my script would go on and on without finishing. If you are using sockets to communicate to other machine, to set the <code>$socket->timeout</code> variable wont help at all! I already tried it and [agoth] explained me that <code>timeout</code> ain't implemented yet for sockets that send or receve .. check it [id://139784|here].
But there is one thing that you can do, that someone told me, but I forgot who (may be it was [agoth] again). You could <code>ping</code> by either using backslash quotes <code>`ping -c1 serveraddress`</code> or using [Net::Ping], and check if server works before every data is sent!<br><br>
<b>Update:</b> or to check if socket that listens on server really listen! It depends on how you implemented the communication between sockets.
141947
141947