Subject: Re: [libssh2] Hanging in libssh2_channel_free?

Re: [libssh2] Hanging in libssh2_channel_free?

From: Dan Fandrich <>
Date: Wed, 9 May 2007 10:58:06 -0700

On Wed, May 09, 2007 at 12:02:29PM -0400, Cary Fitzhugh wrote:
> So I found a place where it?s hanging ?
> It?s waiting to recv the SSH_MSG_CHANNEL_CLOSE from the server.
> If I comment out that bit of code (which I think was added recently to fix an
> SCP problem) the system transfers text files just fine.
> But binary files are hosed.
> I think I could add a switch that would only look for the SSH_MSG_CHANNEL_CLOSE
> on an scp transfer,

The specs say that you *have* to wait for the close before tearing down
the connection. Not doing so can (and does) cause problems, like the
truncated file seen in the curl test suite. Is the sftp server not sending
the close or is it not being received/interpreted by libssh2? The fix that
was checked in a couple of days ago might fix the latter kind of problem.

>>> Dan

--              The web change of address service
          Let webmasters know that your web site has moved
This email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
libssh2-devel mailing list
Received on 2007-05-09