fix: try to make sure we unregister our signal listeners before we

shutdown
This commit is contained in:
Andy Burke 2025-07-23 16:46:40 -07:00
parent 21f132997d
commit cb630a095b
3 changed files with 31 additions and 39 deletions

View file

@ -197,12 +197,11 @@ export class SERVER {
public async stop(): Promise<void> {
if (this.server) {
this.controller?.abort();
await this.server.shutdown();
if (this.shutdown_binding) {
Deno.removeSignalListener('SIGTERM', this.shutdown_binding);
Deno.removeSignalListener('SIGINT', this.shutdown_binding);
}
await this.server.shutdown();
}
if (this.original_directory) {