mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-30 14:17:02 +00:00
Forget which buffers were shared when host reconnects
This fixes a bug where the host would momentarily disconnect and the guest would close and reopen the project. This would cause the host to not observe the guest closing the project. When the guest tried to open one of the buffers opened prior to closing the project, the host would not send them the buffer state because it would still remember that the buffer was shared. The `shared_buffers` map is now cleared when the host reconnects and will slowly get re-filled as guests issue `SynchronizeBuffers` requests.
This commit is contained in:
parent
bf3b8adf35
commit
d7f56d6126
1 changed files with 1 additions and 0 deletions
|
@ -1081,6 +1081,7 @@ impl Project {
|
|||
message: proto::ResharedProject,
|
||||
cx: &mut ModelContext<Self>,
|
||||
) -> Result<()> {
|
||||
self.shared_buffers.clear();
|
||||
self.set_collaborators_from_proto(message.collaborators, cx)?;
|
||||
let _ = self.metadata_changed(cx);
|
||||
Ok(())
|
||||
|
|
Loading…
Reference in a new issue