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.

project: Do not send `UpdateProject` message on remote server spawn (#47633)

Lukas Wirth9e183d94ee93
diff --git a/crates/project/src/worktree_store.rs b/crates/project/src/worktree_store.rs
index 754bc99ce7f..ff6e620618d 100644
--- a/crates/project/src/worktree_store.rs
+++ b/crates/project/src/worktree_store.rs
@@ -913,7 +913,13 @@ impl WorktreeStore {
}
}
}
- self.send_project_updates(cx);
+ // Only send project updates if we share in a collaborative mode.
+ // Otherwise we are the remote server which is currently constructing
+ // worktree store before the client actually has set up its message
+ // handlers.
+ if remote_id != REMOTE_SERVER_PROJECT_ID {
+ self.send_project_updates(cx);
+ }
}
pub fn unshared(&mut self, cx: &mut Context<Self>) {
diff --git a/crates/remote/src/remote_client.rs b/crates/remote/src/remote_client.rs
index 5f67ae75df2..1a2ccbef648 100644
--- a/crates/remote/src/remote_client.rs
+++ b/crates/remote/src/remote_client.rs
@@ -842,7 +842,7 @@ impl RemoteClient {
}
}
} else if exit_code > 0 {
- log::error!("proxy process terminated unexpectedly");
+ log::error!("proxy process terminated unexpectedly: {exit_code}");
this.update(cx, |this, cx| {
this.reconnect(cx).ok();
})?;