aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/ssh.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ssh.c b/lib/ssh.c
index 23a1d3bda..e7935ad24 100644
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -651,7 +651,10 @@ static CURLcode ssh_statemach_act(struct connectdata *conn)
break;
case SSH_SESSION_FREE:
- libssh2_session_free(ssh->ssh_session);
+ rc = libssh2_session_free(ssh->ssh_session);
+ if (rc == LIBSSH2_ERROR_EAGAIN) {
+ break;
+ }
ssh->ssh_session = NULL;
state(conn, SSH_STOP);
result = sshc->actualCode;