Add SocketAuthority.close()

This commit is contained in:
mikiher 2023-12-27 15:33:33 +02:00
parent 0d0bdce337
commit 21d0d43edc
2 changed files with 10 additions and 1 deletions

View file

@ -73,6 +73,15 @@ class SocketAuthority {
}
}
close(callback) {
Logger.info('[SocketAuthority] Shutting down')
// This will close all open socket connections, and also close the underlying http server
if (this.io)
this.io.close(callback)
else
callback()
}
initialize(Server) {
this.Server = Server