fix(update): proactively kill stale gateway PIDs before restart (#28332)
This commit is contained in:
parent
8a05c05596
commit
127bc620fe
@ -12,6 +12,7 @@ import {
|
||||
} from "../../config/config.js";
|
||||
import { formatConfigIssueLines } from "../../config/issue-format.js";
|
||||
import { resolveGatewayService } from "../../daemon/service.js";
|
||||
import { cleanStaleGatewayProcessesSync } from "../../infra/restart-stale-pids.js";
|
||||
import {
|
||||
channelToNpmTag,
|
||||
DEFAULT_GIT_CHANNEL,
|
||||
@ -589,6 +590,10 @@ async function maybeRestartService(params: {
|
||||
}
|
||||
}
|
||||
}
|
||||
// Proactively kill any stale gateway processes (e.g. bare-process nohup gateways)
|
||||
// holding the port before we attempt the restart. Without this, the new process
|
||||
// fails to bind the port and openclaw update leaves two conflicting gateway PIDs.
|
||||
cleanStaleGatewayProcessesSync();
|
||||
if (params.restartScriptPath) {
|
||||
await runRestartScript(params.restartScriptPath);
|
||||
restartInitiated = true;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user