From 0b5f0c5d5e296fbc9edb53ea70324c50b9b2b774 Mon Sep 17 00:00:00 2001 From: Andy Burke Date: Wed, 23 Jul 2025 22:25:00 -0700 Subject: [PATCH] fix: we'll try eliminating the `SERVER.shutdown` method and just use `SERVER.stop` for everything --- deno.json | 2 +- server.ts | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/deno.json b/deno.json index 114156a..c440a37 100644 --- a/deno.json +++ b/deno.json @@ -1,7 +1,7 @@ { "name": "@andyburke/serverus", "description": "A flexible HTTP server for mixed content. Throw static files, markdown, Typescript and (hopefully, eventually) more into a directory and serverus can serve it up a bit more like old-school CGI.", - "version": "0.9.6", + "version": "0.9.7", "license": "MIT", "exports": { ".": "./serverus.ts", diff --git a/server.ts b/server.ts index 8f5ff10..ed5b251 100644 --- a/server.ts +++ b/server.ts @@ -92,10 +92,6 @@ export class SERVER { this.handlers = []; } - private shutdown() { - this.controller?.abort(); - } - /** * Start the server. * @@ -181,7 +177,7 @@ export class SERVER { } ); - this.shutdown_binding = this.shutdown.bind(this); + this.shutdown_binding = this.stop.bind(this); Deno.addSignalListener('SIGTERM', this.shutdown_binding); Deno.addSignalListener('SIGINT', this.shutdown_binding);