Hi all,

I'm new on this list and I'm currently using Jsch for sftp and scp
transfert.

Sftp works very well but I'm experiencing some troubles with scp (using
the ScpToNoneCipher.java example).

For big files (> 800 Ko) , sometimes the sending stops (always between
700-800 Ko) but the process continues running. Sometimes, the sending
successfully finishes (the file is complete in the other side ) but the
process continues running as well.

I investigate a little bit and it seems that the problem come from the
flush() method of OutputStream (returned by ChannelExec). Deeper, the
program goes into an infinte loop (while(true)) in the write() method of
Session class.
Normally, if I understood, the variable c.rwsize is incremented
somewhere in the program regularly (that what some of
System.out.println() show me). But, for an unknown reason, the c.rwsize
stops beeing incremented.
I didn't try to understand more, I just patch the write() method like
this:

--- Session1.java       2012-11-09 16:04:25.000000000 +0100
+++ Session.java        2012-11-09 16:04:12.000000000 +0100
@@ -1245,6 +1245,10 @@
          c.rwsize-=len;
          sendit=true;
        }
+        else
+        {
+                c.addRemoteWindowSize(52224); //52224 -> the value by
which c.rwsize is regularly updated.
+        }
       }
       if(sendit){
        _write(packet);


Thanks in advance for your explanation :-)

Regards,

Gaël
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
JSch-users mailing list
JSch-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to