mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-22 08:02:24 +00:00
fix(switcher): drop a parked create when its machine's connect is called off
Disconnect clears the in-flight connect, so finish_connect never runs and the PendingCreate outlived the intent behind it: the next successful connect to that machine would have silently created a workspace nobody was waiting for anymore.
This commit is contained in:
@@ -946,6 +946,16 @@ impl Tty7App {
|
||||
{
|
||||
self.connect = None;
|
||||
}
|
||||
// A create still waiting on this machine's link dies with the link:
|
||||
// calling the connect off is calling the create off, or the next
|
||||
// successful connect would grow a workspace nobody asked it for.
|
||||
if self
|
||||
.pending_create
|
||||
.as_ref()
|
||||
.is_some_and(|p| &p.target == target)
|
||||
{
|
||||
self.pending_create = None;
|
||||
}
|
||||
cx.notify();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user