Stop waiting for approval when the terminal closes

SIGHUP while waiting for approval released the config lock but left the
host polling, as only SIGINT and SIGTERM stopped the wait.
This commit is contained in:
Danielv123 committed 2026-11-01 12:07:34 +01:00
1 parent 49a0b27d29
commit 495831da29
1 file changed
+2
+2
View File
@@ -232,6 +232,7 @@ async function startHost() {
const onSignal = () => { abort.abort(); };
process.on("SIGINT", onSignal);
process.on("SIGTERM", onSignal);
process.on("SIGHUP", onSignal);
try {
await ensurePaired(hostConfig, {
version: packageConfig.version,
@@ -253,6 +254,7 @@ async function startHost() {
} finally {
process.off("SIGINT", onSignal);
process.off("SIGTERM", onSignal);
process.off("SIGHUP", onSignal);
}
}