mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
fix: release gateway lock on restart failure + reply to Codex reviews
- Release gateway lock when in-process restart fails, so daemon restart/stop can still manage the process (Codex P2) - P1 (env mismatch) already addressed: best-effort by design, documented in JSDoc
This commit is contained in:
committed by
Peter Steinberger
parent
f184e7811c
commit
f84adcbe88
@@ -206,6 +206,11 @@ export async function runGatewayLoop(params: {
|
||||
throw err;
|
||||
}
|
||||
server = null;
|
||||
// Release the gateway lock so that `daemon restart/stop` (which
|
||||
// discovers PIDs via the gateway port) can still manage the process.
|
||||
// Without this, the process holds the lock but is not listening,
|
||||
// forcing manual cleanup. (#35862)
|
||||
await releaseLockIfHeld();
|
||||
const errMsg = err instanceof Error ? err.message : String(err);
|
||||
const errStack = err instanceof Error && err.stack ? `\n${err.stack}` : "";
|
||||
gatewayLog.error(
|
||||
|
||||
Reference in New Issue
Block a user