libssh2: fix sftp_statemachine busyloop when *block=true

Closes #18311
This commit is contained in:
sunriseL 2025-08-18 19:34:43 +08:00 committed by Daniel Stenberg
parent b9e3ea4edb
commit c294d0abc5
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -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