Skip to content

Commit c40c04d

Browse files
committed
Fix: properly exit on SIGTERM and SIGINT
1 parent b9ea083 commit c40c04d

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 0.2.2
2+
3+
Fix: properly exit when receiving SIGTERM or SIGINT
4+
15
# 0.2.1
26

37
No changes (fix the publishing workflow)

src/run.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ async function main() {
2727
const evHandler = () => {
2828
s.close();
2929
};
30-
s.on("SIGTERM", evHandler);
31-
s.on("SIGINT", evHandler);
30+
process.on("SIGTERM", evHandler);
31+
process.on("SIGINT", evHandler);
3232

3333
console.error(`Listening on port ${cfg.port}`);
3434
}

0 commit comments

Comments
 (0)