fix: unlisten for interrupts earlier

This commit is contained in:
Andy Burke 2025-07-23 17:00:15 -07:00
parent cb630a095b
commit 4f2ea38222
2 changed files with 2 additions and 2 deletions

View file

@ -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();
}