Subject: Re: libssh2_channel_wait_closed(...) issue

Re: libssh2_channel_wait_closed(...) issue

From: Maxime Larocque <>
Date: Wed, 19 Sep 2012 19:55:18 -0400

Hi Chris,

Le 19/09/2012 16:51, Chris Harris a écrit :
> [snip] The problem seem to be that libssh2_channel_wait_closed return
> 0 before the sshd has finish cleaning up the channel, so an attempt to
> create another channel at this point results in an error (-21). The
> reason I think the libssh2_channel_wait_closed is returning too soon
> is if I add a sleep between my execs the channels are created with out
> a problem.

I had a similar trouble with libssh2 1.4.2, and I submitted a patch to
correct this:

Under some conditions, libssh2 did not close the channel correctly. I am
not sure if it applies to your case...



Received on 2012-09-20