Fix opening a buffer after leaving and joining the same project

This bug existed prior to #1700 and was caused by not clearing the
buffers that were already shared with a peer that left and opened
a project using the same connection. When such peer would re-join
the project and open a buffer that it had opened previously, the
host assumed the peer had already seen that buffer and wouldn't bother
sending it again.
This commit is contained in:
Antonio Scandurra 2022-10-12 10:28:17 +02:00
parent e24a69b838
commit 9adbab5d99
3 changed files with 49 additions and 6 deletions

View file

@ -1205,7 +1205,7 @@ impl Store {
let guest_connection = self.connections.get(guest_connection_id).unwrap();
assert!(guest_connection.projects.contains(project_id));
}
assert_eq!(project.active_replica_ids.len(), project.guests.len(),);
assert_eq!(project.active_replica_ids.len(), project.guests.len());
assert_eq!(
project.active_replica_ids,
project