project: Do not send `UpdateProject` message on remote server spawn (#47633)
Lukas Wirth
created
The client has not yet setup its own side of things so the message will
always error as being unhandled anyways.
Release Notes:
- N/A *or* Added/Fixed/Improved ...
@@ -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>) {