← Commit list

39088cd295

Jorge Rocamora
Jorge Rocamora
2026-09-20
SUCCESS Duration: 410s

Subject

vssh: do not busy-loop in blocking state machine without a timeout

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/vssh/libssh.c+2 -1
@@ -2500,7 +2500,8 @@ static CURLcode myssh_block_statemach(struct Curl_easy *data,
if(block) {
curl_socket_t fd_read = conn->sock[FIRSTSOCKET];
/* wait for the socket to become ready */
- (void)SOCKET_READABLE(fd_read, left_ms > 1000 ? 1000 : left_ms);
+ (void)SOCKET_READABLE(fd_read,
+ (!left_ms || left_ms > 1000) ? 1000 : left_ms);
}
}
lib/vssh/libssh2.c+1 -1
@@ -3239,7 +3239,7 @@ static CURLcode ssh_block_statemach(struct Curl_easy *data,
fd_write = sock;
/* wait for the socket to become ready */
(void)Curl_socket_check(fd_read, CURL_SOCKET_BAD, fd_write,
- left_ms > 1000 ? 1000 : left_ms);
+ (!left_ms || left_ms > 1000) ? 1000 : left_ms);
}
}