Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
ssh remoting: Fix hang when activity channel gets dropped (#19275)
Thorsten Balleb76065ad306
diff --git a/crates/remote/src/ssh_session.rs b/crates/remote/src/ssh_session.rsindex 4d131425492..ed4bbbefaed 100644--- a/crates/remote/src/ssh_session.rs+++ b/crates/remote/src/ssh_session.rs@@ -743,7 +743,11 @@ impl SshRemoteClient {loop {select_biased! {- _ = connection_activity_rx.next().fuse() => {+ result = connection_activity_rx.next().fuse() => {+ if result.is_none() {+ log::warn!("ssh heartbeat: connection activity channel has been dropped. stopping.");+ return Ok(());+ }keepalive_timer.set(cx.background_executor().timer(HEARTBEAT_INTERVAL).fuse());}_ = keepalive_timer => {