in reply to Re: Net::Telnet - how to detect a reset connection ?
in thread Net::Telnet - how to detect a reset connection ?

The most promising option I've found is that errmsg() gets set to 'Connection reset by peer' when the connection has been reset... but it's not ideal because I have to do a string comparison, and there may be other values of errmsg that require a reconnection to recover that I don't know about yet.

I think what I'm looking for is something like $t->alive() or $t->ping() that returned 0 or 1 based on whether the tcp connection was open not.

  • Comment on Re^2: Net::Telnet - how to detect a reset connection ?