fix: align launchd polling with exit timeout

This commit is contained in:
fuller-stack-dev
2026-06-23 01:37:08 -06:00
parent e2e9227431
commit 400e87c937
+2 -1
View File
@@ -23,6 +23,7 @@ import { execFileUtf8 } from "./exec-file.js";
import { isCurrentProcessLaunchdServiceLabel } from "./launchd-current-service.js";
import {
buildLaunchAgentPlist as buildLaunchAgentPlistImpl,
LAUNCH_AGENT_EXIT_TIMEOUT_SECONDS,
readLaunchAgentProgramArgumentsFromFile,
} from "./launchd-plist.js";
import { scheduleDetachedLaunchdRestartHandoff } from "./launchd-restart-handoff.js";
@@ -50,7 +51,7 @@ const LAUNCH_AGENT_ENV_DIR_NAME = "service-env";
const LAUNCH_AGENT_STDERR_PATH = "/dev/null";
const OPENCLAW_UPDATE_LAUNCHD_LABEL_PREFIX = "ai.openclaw.update.";
const OPENCLAW_MANUAL_UPDATE_LAUNCHD_LABEL_PATTERN = /^ai\.openclaw\.manual-update\.\d+$/;
const LAUNCH_AGENT_STOP_PORT_RELEASE_TIMEOUT_MS = 2_000;
const LAUNCH_AGENT_STOP_PORT_RELEASE_TIMEOUT_MS = LAUNCH_AGENT_EXIT_TIMEOUT_SECONDS * 1_000;
const LAUNCH_AGENT_STOP_PORT_RELEASE_POLL_MS = 100;
export type StaleOpenClawUpdateLaunchdJob = {