From: sunriseL <540729251@qq.com> Date: Mon, 18 Aug 2025 11:34:43 +0000 (+0800) Subject: libssh2: fix sftp_statemachine busyloop when *block=true X-Git-Tag: curl-8_16_0~155 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c294d0abc5b62b8068af391576be87b821d2ff8b;p=thirdparty%2Fcurl.git libssh2: fix sftp_statemachine busyloop when *block=true Closes #18311 --- 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