Skip to content

Commit

Permalink
Respect SIGTERM as termination event (#1838)
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan authored Nov 25, 2024
1 parent 5d67e83 commit 8947888
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tricky-trains-shave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@whatwg-node/server': patch
---

Respect SIGTERM as termination event
2 changes: 1 addition & 1 deletion packages/server/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ export function handleResponseDecompression(response: Response, fetchAPI: FetchA
return decompressedResponse;
}

const terminateEvents = ['SIGINT', 'exit'] as const;
const terminateEvents = ['SIGINT', 'exit', 'SIGTERM'] as const;
const disposableStacks = new Set<AsyncDisposableStack>();

let eventListenerRegistered = false;
Expand Down

0 comments on commit 8947888

Please sign in to comment.