Hi, +-From: Ilya Basin <basini...@gmail.com> -- |_Date: Tue, 29 Mar 2011 18:56:46 +0400 ___ | |Hi. I need to execute a command with timeout. In a TimerTask |Session.disconnect() is called. I expect some exception in main |thread from ChannelExec.getInputStream().read(), but it simply returns |EOF. |Same when I close connection in TCPView. |How to distinguish disconnect and empty result? By getExitStatus() == -1 ?
"-1" means exit-status has not been given yet. So, it will be good idea to refer to that value to check if the connection is successfully finished or not. Sincerely, -- Atsuhiko Yamanaka JCraft,Inc. 1-14-20 HONCHO AOBA-KU, SENDAI, MIYAGI 980-0014 Japan. Tel +81-22-723-2150 +1-415-578-3454 Skype callto://jcraft/ Twitter: http://twitter.com/ymnk ------------------------------------------------------------------------------ Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar _______________________________________________ JSch-users mailing list JSch-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jsch-users