fix(macos): disable gateway launchd job when switching to remote mode
Previously the stop() function had an early return when in remote mode, which skipped disabling the launchd job. This caused the gateway daemon to restart every 10 seconds due to KeepAlive, logging repeated 'Gateway start blocked' messages. Fixes #2433
This commit is contained in:
parent
cd7be58b8e
commit
e119cfb468
@ -52,6 +52,7 @@ Status: unreleased.
|
||||
- **BREAKING:** Gateway auth mode "none" is removed; gateway now requires token/password (Tailscale Serve identity still allowed).
|
||||
|
||||
### Fixes
|
||||
- macOS: disable gateway launchd job when switching to remote mode. (#2433)
|
||||
- Security: pin npm overrides to keep tar@7.5.4 for install toolchains.
|
||||
- BlueBubbles: coalesce inbound URL link preview messages. (#1981) Thanks @tyler6204.
|
||||
- Agents: include memory.md when bootstrapping memory context. (#2318) Thanks @czekaj.
|
||||
|
||||
@ -51,8 +51,10 @@ enum GatewayLaunchAgentManager {
|
||||
|
||||
static func set(enabled: Bool, bundlePath: String, port: Int) async -> String? {
|
||||
_ = bundlePath
|
||||
guard !CommandResolver.connectionModeIsRemote() else {
|
||||
self.logger.info("launchd change skipped (remote mode)")
|
||||
// In remote mode, skip enabling (the local gateway shouldn't run), but still
|
||||
// allow disabling so the launchd job stops retrying every 10 seconds.
|
||||
if enabled, CommandResolver.connectionModeIsRemote() {
|
||||
self.logger.info("launchd enable skipped (remote mode)")
|
||||
return nil
|
||||
}
|
||||
if enabled, self.isLaunchAgentWriteDisabled() {
|
||||
|
||||
@ -129,9 +129,8 @@ final class GatewayProcessManager {
|
||||
self.lastFailureReason = nil
|
||||
self.status = .stopped
|
||||
self.logger.info("gateway stop requested")
|
||||
if CommandResolver.connectionModeIsRemote() {
|
||||
return
|
||||
}
|
||||
// Always disable the launchd job, even in remote mode. Otherwise the job
|
||||
// keeps restarting the gateway daemon every 10 seconds (KeepAlive throttle).
|
||||
let bundlePath = Bundle.main.bundleURL.path
|
||||
Task {
|
||||
_ = await GatewayLaunchAgentManager.set(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user