Hi,

   +-From: Roland Schulz <rol...@utk.edu> ---
   |_Date: Thu, 28 Jan 2010 20:35:57 -0500 __
   |
   |I have one problem. When Thread.interrupt() is called 
   |while there is a sftp connection running I get errors like:
   |Caused by: 4:
   ...

Who interrupts the thread? 
Is it easy to reproduce that exception if I try Eclipse PTP plug-in?

   ...
   |Is this this behavior intended?

No, we had not expected such an interrupt, frankly to say. 

   |My understanding is that a channel (like ChannelSFTP) should either:
   |1) Ignore InterruptedException, complete the IO operation and then setting
   |the  thread's interrupt status.
   |2) Throw InterruptedIOException
   |3) Implement InterruptibleChannel as e.g. java.nio.channels.FileChannel
   |and gracefully close the channel and throw a ClosedByInterruptException

   |At the moment it seems to throw a SftpException without 
   |a message indicating that it got interrupted.

You will find the reason by SftpException#getCause() method.

   |IMHO, the best would be if one could choose when opening a channel 
   |wither it should behave like 1 or like 3.

If the implementation should be changed, I'll choose to disconnect
the channel in such a case.

By the way, I had not recognized that Eclipse PTP has been using jsch.
Thank you for your feed back!


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: @ymnk

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
JSch-users mailing list
JSch-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to