diff --git a/lib/vssh/libssh2.c b/lib/vssh/libssh2.c index f6985ed251..ea76482394 100644 --- a/lib/vssh/libssh2.c +++ b/lib/vssh/libssh2.c @@ -3073,7 +3073,7 @@ static CURLcode ssh_statemachine(struct Curl_easy *data, break; } - } while(!result && (sshc->state != SSH_STOP)); + } while(!result && (sshc->state != SSH_STOP) && !*block); if(result == CURLE_AGAIN) { /* we would block, we need to wait for the socket to be ready (in the