]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
libssh2: fix sftp_statemachine busyloop when *block=true
authorsunriseL <540729251@qq.com>
Mon, 18 Aug 2025 11:34:43 +0000 (19:34 +0800)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 19 Aug 2025 06:07:33 +0000 (08:07 +0200)
Closes #18311

lib/vssh/libssh2.c

index f6985ed251b71c986ec77b20d76a841831c39761..ea76482394efa3c10ac8a7faed433d039161f071 100644 (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