Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

remote: 60 second timeout on initial connection (#41339)

versecafecc829e7fdbc5
diff --git a/crates/remote/src/remote_client.rs b/crates/remote/src/remote_client.rs
index c5f511db5f9..78fed0384ca 100644
--- a/crates/remote/src/remote_client.rs
+++ b/crates/remote/src/remote_client.rs
@@ -87,6 +87,7 @@ pub trait RemoteClientDelegate: Send + Sync {
const MAX_MISSED_HEARTBEATS: usize = 5;
const HEARTBEAT_INTERVAL: Duration = Duration::from_secs(5);
const HEARTBEAT_TIMEOUT: Duration = Duration::from_secs(5);
+const INITIAL_CONNECTION_TIMEOUT: Duration = Duration::from_secs(60);
const MAX_RECONNECT_ATTEMPTS: usize = 3;
@@ -350,7 +351,7 @@ impl RemoteClient {
let ready = client
.wait_for_remote_started()
- .with_timeout(HEARTBEAT_TIMEOUT, cx.background_executor())
+ .with_timeout(INITIAL_CONNECTION_TIMEOUT, cx.background_executor())
.await;
match ready {
Ok(Some(_)) => {}