Files
orca/src/main
Neil 51c393bc2e fix(wsl): close a WSL host's loopback listener once it idles out or its distro stops (#34046)
* fix(wsl): close a WSL host's loopback listener once its orcad idled out or its distro stopped

The supervisor already stops watching an idle or stopped host and never relaunches it for
background work, but the bridge's loopback listener stayed open, and any dial to it (a status
probe, a stale client) spawned wsl.exe and booted the distro again. Retire the listener in both
branches without publishing 'closed', so the host keeps reading as idle or stopped; the next
user connect binds a new one.

* fix(wsl): a retired listener never proves orcad live; never retire a connect in flight

Review of the listener retirement: with no connection, the port probe answered 'ready', so a
wake verify with no orcad pid to compare read the host as live, published ready and re-held
the distro. It now reads as refused. retireListener also leaves alone a key whose user connect
is in flight, so a trigger mid-connect cannot retire the entry that connect produces.

* fix(wsl): retire the listener on E9's single park path too

E9 A parks every confirmed stop, visible work or not; retire the loopback listener there,
before the deferred re-check, so a dial cannot boot the parked distro.

* fix(wsl): read the park generation before retiring the listener
2026-10-26 22:15:00 -07:00
..