Hi, +-From: Watcharin Leungwattanakit <watcha...@is.s.u-tokyo.ac.jp> -- |_Date: Thu, 10 Mar 2011 13:39:19 +0900 ___________________________ | |- There is no synchronization between these threads. As a result, they |run independently in parallel. |- The main thread runs along the following trace. | throw new JSchException("channel is not opened."); (Channel.java: 188) | channel.connect(); (ScpTo.java: 42) |- This happens if the main thread reaches the failed point before the |Session thread assigns member "recipient" at (Session.java: 1403).
That is just the unlucky case. Even if "recipient" is assigned after "channel is opened" exception, the resource will not be leaked. So, what is the problem? Just hope that, in the next trial, you will get promptly the response for the channel opening request with the longer timeout setting. 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 ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ JSch-users mailing list JSch-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jsch-users