fix: unlisten for interrupts earlier
This commit is contained in:
parent
cb630a095b
commit
4f2ea38222
2 changed files with 2 additions and 2 deletions
|
@ -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.4",
|
||||
"version": "0.9.5",
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
".": "./serverus.ts",
|
||||
|
|
|
@ -196,11 +196,11 @@ export class SERVER {
|
|||
*/
|
||||
public async stop(): Promise<void> {
|
||||
if (this.server) {
|
||||
this.controller?.abort();
|
||||
if (this.shutdown_binding) {
|
||||
Deno.removeSignalListener('SIGTERM', this.shutdown_binding);
|
||||
Deno.removeSignalListener('SIGINT', this.shutdown_binding);
|
||||
}
|
||||
this.controller?.abort();
|
||||
await this.server.shutdown();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue