From 0ecd0eb37c02216bcb0c34797beb645bf14cf4bb Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 13 Apr 2010 22:59:52 +0200 Subject: [PATCH] channel_close: no longer wait for the SSH_MSG_CHANNEL_CLOSE message As the packet may simply not arrive we cannot have the close function wait for it unconditionally. --- src/channel.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/channel.c b/src/channel.c index b53872d..2866402 100644 --- a/src/channel.c +++ b/src/channel.c @@ -2221,9 +2221,8 @@ channel_close(LIBSSH2_CHANNEL * channel) if ((retcode = channel_send_eof(channel))) return retcode; - if (!channel->remote.eof) - if ((retcode = channel_wait_eof(channel))) - return retcode; + /* ignore if we have received a remote eof or not, as it is now too + late for us to wait for it. Continue closing! */ if (channel->close_state == libssh2_NB_state_idle) { _libssh2_debug(session, LIBSSH2_TRACE_CONN, "Closing channel %lu/%lu",