Skip to content

The agent that grows with you

fix(desktop): a failed SSH teardown in the pool-stop fence is logged, not thrown

kshitijk4poore24b344b6c78
diff --git a/apps/desktop/electron/main.ts b/apps/desktop/electron/main.ts
index be7709bfa8a..7bf419e310e 100644
--- a/apps/desktop/electron/main.ts
+++ b/apps/desktop/electron/main.ts
@@ -12742,7 +12742,13 @@ const poolStopper = createPoolStopper({
// immediate; hold the same in-flight fence through bootstrap drain + SSH
// teardown so a reconnect cannot publish into a dying scope (#106935).
afterStop: async key => {
- await sshBootstrapCoordinator.cancelAndWait(key, () => teardownSshConnection(key))
+ try {
+ await sshBootstrapCoordinator.cancelAndWait(key, () => teardownSshConnection(key))
+ } catch (err) {
+ // The idle reaper calls stopPoolBackend un-awaited; a failed SSH teardown
+ // must not surface as an unhandled rejection or block the pool fence.
+ sshRememberLog(`[ssh-teardown] ${key}: ${String(err)}`)
+ }
}
})