Merge pull request #982 from wes-davis/fix/gateway-connection-diagnostics

macOS: keep gateway connected (stop port flapping)
This commit is contained in:
Peter Steinberger authored and GitHub committed 2026-01-16 07:36:46 +00:00
commit d42b69df74
4 files changed
+39 -11

No files matched your search

@@ -87,6 +87,14 @@ final class GatewayProcessManager {
self.status = .stopped
return
}
// Many surfaces can call `setActive(true)` in quick succession (startup, Canvas, health checks).
// Avoid spawning multiple concurrent "start" tasks that can thrash launchd and flap the port.
switch self.status {
case .starting, .running, .attachedExisting:
return
case .stopped, .failed:
break
}
self.status = .starting
self.logger.debug("gateway start requested")