Subject: libssh2_sftp_write doesn't hang anymore

libssh2_sftp_write doesn't hang anymore

From: Mark Riordan <>
Date: Wed, 10 Nov 2010 18:18:08 -0600

I saw that Daniel committed a bunch of changes, so I pulled them
and tried my test program again. (There was probably an email
associated with the changes, but I'm subscribed to the digest rather
than individual messages. I fixed that.)

My upload test from Windows to Linux now works!

But it's very slow, even with debug turned off.

I uploaded a 479988 byte file consisting of a bunch of lines
Line 1
Line 2

The 19 MB debug log has 149009 "Would block" messages, which seems
excessive - one for every 4 bytes.
The log was created by virtue of this code:
  bitmask = LIBSSH2_TRACE_ERROR;
  libssh2_trace(session, bitmask);

The file is at:
(This is the first time I've ever gotten zip to report 100% compression!)

My application recorded that calls to libssh2_sftp_write generally
resulted in 4000 or 8000 bytes written. Never less than 500.



Received on 2010-11-11