fix: try to make sure we unregister our signal listeners before we
shutdown
This commit is contained in:
parent
21f132997d
commit
cb630a095b
3 changed files with 31 additions and 39 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue