Posted on 2008-10-24 22:25:31-07 by thekat
How to detect if the connection has died?
I'm having a problem with the Net::SSH2 module. My case is: I use the channel's exec() to execute a command. I start pulling back the output. The command causes the remote side to reboot (expected) but the connection dies uncleanly (no EOF) When I get into this state, eof() returns true. read does not return undef. Basically everything I'd expect to be reporting problems is not. So, how do I tell that my connection has died? Thanks.
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.