Repository navigation
Conversation
|
Ideally of course we should not use these blocking functions at all, but while we do I think this is a correct fix. |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
Both SSH backends correctly avoid zero-timeout polling without affecting finite timeout behavior.
Review effort: Lite
Findings: None
What changed in this PR
Prevents libssh and libssh2 blocking state machines from busy-looping when no transfer timeout is configured.
Changes:
- Uses a 1-second wait when
Curl_timeleft_ms()returns zero. - Preserves existing timeout capping behavior.
| File | Description |
|---|---|
lib/vssh/libssh2.c |
Fixes socket wait timeout handling. |
lib/vssh/libssh.c |
Fixes readable-socket wait timeout handling. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Indeed. I ran into this while using the multi interface with async python wrapper for SFTP transfers and realized the SFTP paths still block. Is anyone working on making them non-blocking? If not, I'd be happy to contribute. |
7832d2e to
97f8d4b
Compare
I'm not aware of anyone working on these, no. |
|
Thanks! |
Avoid busy loop in SSH state machines (both libssh and libssh2) when
Curl_timeleft_ms()returns 0 (i.e. no timeout).