Re: [JSch-users] Should ChannelSession.run() disconnect when the threadterminates?
Status: Alpha
Brought to you by:
ymnk
From: Oberhuber, M. <Mar...@wi...> - 2006-08-10 08:09:43
|
Hmm, I see. What has given me headaches, though, was that the IOException that was thrown for the broken pipe, had been caught away and there was no chance for me to diagnose the problem. Would it make sense to store away that exception, and make it available by a call such as Channel.getLastException() or Channel.getLastError() ? Cheers, -- Martin Oberhuber Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm=20 > -----Original Message----- > From: Atsuhiko Yamanaka [mailto:ym...@jc...]=20 > Sent: Wednesday, August 09, 2006 2:07 PM > To: Oberhuber, Martin > Cc: jsc...@li... > Subject: Re: [JSch-users] Should ChannelSession.run()=20 > disconnect when the threadterminates? >=20 > Hi, >=20 > +-From: "Oberhuber, Martin" <Mar...@wi...> -- > |_Date: Tue, 8 Aug 2006 10:10:28 +0200 ________________________ > | > |The problem with this is, that the exception is normally=20 > |caught away, and the shell thread ends. But when the > |user tries channel.isConnected() it still returns true > |for a connected channel -- but the channel is no longer > |useable since the thread is dead. >=20 > In that case, as you have written, the data stream from=20 > client to sshd=20 > is no longer usabale, but yet another data stream from sshd to client > may be still alive. >=20 > |I was wondering whether a dying session thread shouldn't > |mark the channel disconnected since the channel is no > |longer useable (ChannelSession.java line 80:) >=20 > So, it is not good idea to automatically disconnect that channel > in that method. >=20 >=20 > 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 > Fax +81-22-224-8773 > Skype callto://jcraft/ >=20 |