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:
l0ng-ai
2026-08-13 17:27:53 +08:00
parent d6160058d7
commit 2f100b2a04
+10
View File
@@ -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();
}