From f54f653d422fcc70de1c3beebe7a8423c1e2abfd Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 1 Nov 2022 11:21:40 +0100 Subject: [PATCH] Don't return an error when failing to send `AddProjectCollaborator` This can happen when a peer has disconnected but we haven't yet been able to acquire a lock to the store to clean up the state associated with it. --- crates/collab/src/rpc.rs | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/crates/collab/src/rpc.rs b/crates/collab/src/rpc.rs index 059a1d46e6..9fd9bef825 100644 --- a/crates/collab/src/rpc.rs +++ b/crates/collab/src/rpc.rs @@ -1041,17 +1041,19 @@ impl Server { for conn_id in project.connection_ids() { if conn_id != request.sender_id { - self.peer.send( - conn_id, - proto::AddProjectCollaborator { - project_id: project_id.to_proto(), - collaborator: Some(proto::Collaborator { - peer_id: request.sender_id.0, - replica_id: replica_id as u32, - user_id: guest_user_id.to_proto(), - }), - }, - )?; + self.peer + .send( + conn_id, + proto::AddProjectCollaborator { + project_id: project_id.to_proto(), + collaborator: Some(proto::Collaborator { + peer_id: request.sender_id.0, + replica_id: replica_id as u32, + user_id: guest_user_id.to_proto(), + }), + }, + ) + .trace_err(); } }