Johan - 2010-10-29

Hi,

I'm using an exec channel to run a command on a remote host. I've set the session  serverAlliveInterval like this
                 session.setServerAliveInterval(1000);  //<- using a much higher value in production
This obviously then sets a timeout on the socket and when this timeout is reached with no response from the host, the readline from the channel inputstream times out and returns to my code.
Is there any way to "catch" this timeout and let my application handle it? 
Currently, the readline just returns as if the command ran successfull, but it did not, it timed out and there is no way for me te trap this timeout.

Thanks in advance for you time.