summaryrefslogtreecommitdiffstats
path: root/libssh
diff options
context:
space:
mode:
Diffstat (limited to 'libssh')
-rw-r--r--libssh/channels.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libssh/channels.c b/libssh/channels.c
index a0355796..0a7e5780 100644
--- a/libssh/channels.c
+++ b/libssh/channels.c
@@ -165,8 +165,10 @@ static int channel_open(ssh_channel channel, const char *type_c, int window,
type_c, channel->local_channel);
if (packet_wait(session, SSH2_MSG_CHANNEL_OPEN_CONFIRMATION, 1) != SSH_OK) {
- leave_function();
- return -1;
+ if(session->in_packet.type != SSH2_MSG_CHANNEL_OPEN_FAILURE) {
+ leave_function();
+ return -1;
+ }
}
switch(session->in_packet.type) {