in reply to Re: IO::Socket client does not detect when server network connection dies
in thread IO::Socket client does not detect when server network connection dies
Thanks everyone for the feedback. I was to 'heart beat' the connection with IO::Select and can_read(). I'm sure I'll need to tweak it as I dig deeper, but this is a better start.
my $i = 1; while ( $i > 0 ){ if ($sel->can_read(20)) { my $line = <$socket>; print $line; } else { $socket->send(";"); } }
|
|---|