mirror of
https://github.com/ragestudio/linebridge.git
synced 2025-06-09 10:34:17 +00:00
fix exit handler
This commit is contained in:
parent
604edd49ae
commit
daa0110c7e
@ -123,7 +123,6 @@ class Server {
|
|||||||
// handle exit events
|
// handle exit events
|
||||||
process.on("SIGTERM", this.cleanupProcess)
|
process.on("SIGTERM", this.cleanupProcess)
|
||||||
process.on("SIGINT", this.cleanupProcess)
|
process.on("SIGINT", this.cleanupProcess)
|
||||||
process.on("exit", this.cleanupProcess)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
initializeHeaders = () => {
|
initializeHeaders = () => {
|
||||||
@ -271,10 +270,12 @@ class Server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cleanupProcess = () => {
|
cleanupProcess = () => {
|
||||||
console.log("🔴 Stopping server...")
|
console.log("🛑 Stopping server...")
|
||||||
|
|
||||||
this.httpInterface.close()
|
this.httpInterface.close()
|
||||||
this.wsInterface.io.close()
|
this.wsInterface.io.close()
|
||||||
|
|
||||||
|
process.exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// handlers
|
// handlers
|
||||||
|
Loading…
x
Reference in New Issue
Block a user