fix(gateway): refine process termination and wait logic on retry (#750)

This commit is contained in:
paisley
2026-04-02 16:45:23 +08:00
committed by GitHub
Unverified
parent 560ae95611
commit 28508bc643
3 changed files with 14 additions and 5 deletions

View File

@@ -297,11 +297,13 @@ export class GatewayManager extends EventEmitter {
process.kill(pid, 0);
// Still alive — keep this.process so later cleanup can reach it
} catch {
// Process is gone — safe to clear the handle
// Process is gone — safe to clear the handle and ownership flag
this.process = null;
this.ownsProcess = false;
}
} else {
this.process = null;
this.ownsProcess = false;
}
}
},