Don't wait for host's worktree updates if they disconnected
Co-Authored-By: Max Brunsfeld <max@zed.dev>
This commit is contained in:
parent
48ff443d10
commit
2d8ffbdfa2
2 changed files with 20 additions and 5 deletions
|
@ -1343,6 +1343,15 @@ impl Project {
|
|||
{
|
||||
*sharing_has_stopped = true;
|
||||
self.collaborators.clear();
|
||||
for worktree in &self.worktrees {
|
||||
if let Some(worktree) = worktree.upgrade(cx) {
|
||||
worktree.update(cx, |worktree, _| {
|
||||
if let Some(worktree) = worktree.as_remote_mut() {
|
||||
worktree.disconnected_from_host();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
cx.notify();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue