From 3bef3c97a666594bdca3f200c2427fdbe657f7fb Mon Sep 17 00:00:00 2001 From: Jesse Friedman Date: Sun, 23 Aug 2026 19:53:57 +0900 Subject: [PATCH] Fix transposed arguments in Channel::poll_timeout calling sys::ssh_channel_poll_timeout ssh_channel_poll_timeout's signature is (channel, timeout, is_stderr). --- libssh-rs/src/channel.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libssh-rs/src/channel.rs b/libssh-rs/src/channel.rs index 54f7ff8..88cd6b8 100644 --- a/libssh-rs/src/channel.rs +++ b/libssh-rs/src/channel.rs @@ -459,7 +459,7 @@ impl Channel { None => -1, }; let res = - unsafe { sys::ssh_channel_poll_timeout(chan, if is_stderr { 1 } else { 0 }, timeout) }; + unsafe { sys::ssh_channel_poll_timeout(chan, timeout, if is_stderr { 1 } else { 0 }) }; match res { sys::SSH_ERROR => { if let Some(err) = sess.last_error() {