Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions examples/scripts/http_server_graceful_shutdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,9 @@ const onSigint = () => shutdown("SIGINT");
const onSigterm = () => shutdown("SIGTERM");

// SIGINT is what Ctrl+C sends, SIGTERM is what process managers, docker
// stop, and Kubernetes send first. Note that SIGTERM listeners are not
// supported on Windows.
// stop, and Kubernetes send first.
Deno.addSignalListener("SIGINT", onSigint);
if (Deno.build.os !== "windows") {
Deno.addSignalListener("SIGTERM", onSigterm);
}
Deno.addSignalListener("SIGTERM", onSigterm);

// Start a slow request, then send SIGTERM while it is still running:
//
Expand Down
Loading