Stop following when leader disconnects

This commit is contained in:
Antonio Scandurra 2022-03-22 11:15:39 +01:00
parent ffaf409a31
commit e5a99cf8cd
3 changed files with 60 additions and 10 deletions

View file

@ -125,6 +125,7 @@ pub enum Event {
DiskBasedDiagnosticsFinished,
DiagnosticsUpdated(ProjectPath),
RemoteIdChanged(Option<u64>),
CollaboratorLeft(PeerId),
}
enum LanguageServerEvent {
@ -3368,6 +3369,7 @@ impl Project {
buffer.update(cx, |buffer, cx| buffer.remove_peer(replica_id, cx));
}
}
cx.emit(Event::CollaboratorLeft(peer_id));
cx.notify();
Ok(())
})