diff options
| author | Can Celik <ogulcancelik@gmail.com> | 2026-09-14 03:55:53 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-14 03:55:53 +0300 |
| commit | c77af1892ff121736ecb103b32d504d6f1b31805 (patch) | |
| tree | f3012dfa1720ddbb5c2e789c3544fe0915f9c426 /src/remote/host.rs | |
| parent | 21c1f8cf856affb875b5ab4302225a63f4563bdd (diff) | |
fix: clean up idle ssh bridges and back off flapping connections (#4083)
* fix: clean up idle ssh bridges and back off flapping connections
* chore: keep ssh liveness smoke tooling local
Diffstat (limited to 'src/remote/host.rs')
| -rw-r--r-- | src/remote/host.rs | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/remote/host.rs b/src/remote/host.rs index 1ff6d1e5..08f5d122 100644 --- a/src/remote/host.rs +++ b/src/remote/host.rs @@ -3,7 +3,22 @@ use std::io; use std::time::Duration; -pub(crate) fn run_remote_client_bridge() -> io::Result<()> { +pub(crate) fn run_remote_client_bridge(args: &[String]) -> io::Result<()> { + let idle_timeout = match args { + [] => false, + [option] + if option == "--idle-timeout-v1" + && crate::platform::REMOTE_BRIDGE_IDLE_TIMEOUT_SUPPORTED => + { + true + } + _ => { + return Err(io::Error::new( + io::ErrorKind::InvalidInput, + "unsupported remote client bridge option", + )) + } + }; ensure_remote_server_running()?; let socket_path = crate::server::socket_paths::client_socket_path(); @@ -17,7 +32,7 @@ pub(crate) fn run_remote_client_bridge() -> io::Result<()> { ) })?; - crate::platform::forward_remote_bridge_stdio(stream) + crate::platform::forward_remote_bridge_stdio(stream, idle_timeout) } fn ensure_remote_server_running() -> io::Result<()> { |
