----- Forwarded Message -----

From: Nguyen Tran Vu Linh <vlsuperman2...@yahoo.com>
To: Atsuhiko Yamanaka <y...@jcraft.com> 
Sent: Tuesday, February 7, 2012 10:22 AM
Subject: SFTP directory existence checking error
 

Hi,

I'm using Jsch version 0.1.45 and I encountered an error as described below:
- When I keep SFTP channel connecting with SFTP server and transfer multiple 
files (~1000), it throws out the exception "Pipe closed" at the directory 
existence checking function.
- When I transfer files one-by-one (e.g. connect, put file, disconnect, and 
then connect again....), it works fine.

I opened multiple channel in my system to boost the file transfer. Look at the 
source code, I found that the stat(String path) method use the function that 
can cause exception:

/*
* TODO: We should have our own Piped[I/O]Stream implementation.
* Before accepting data, JDK's PipedInputStream will check the existence of
* reader thread, and if it is not alive, the stream will be closed.
* That behavior may cause the problem if multiple threads make access to it.
*/
    public synchronized void updateReadSide() throws IOException {
      if(available() != 0){ // not empty
        return;
      }
      in = 0;
      out = 0;
      buffer[in++] = 0;
      read();
}

In version 0.1.46, I could see that this is not fixed. Do you consider it as a 
critical bug?

Thanks,

Linh Nguyen.
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
JSch-users mailing list
JSch-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to