Fix SIGTERM handler not disconnecting gateway clients and leaving timeouts active
This commit is contained in:
@@ -82,7 +82,11 @@ export class Server {
|
||||
}
|
||||
|
||||
async stop() {
|
||||
closeDatabase();
|
||||
this.server.close();
|
||||
this.ws.clients.forEach((x) => x.close());
|
||||
this.ws.close(() => {
|
||||
this.server.close(() => {
|
||||
closeDatabase();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user