mirror of
https://github.com/ragestudio/linebridge.git
synced 2025-06-09 10:34:17 +00:00
check if httpInterface has a close function
This commit is contained in:
parent
65d987fa51
commit
203ed30c92
@ -24,6 +24,8 @@ const HTTPEngines = {
|
||||
return require("nanoexpress")()
|
||||
},
|
||||
"express": () => {
|
||||
|
||||
|
||||
return require("express")()
|
||||
},
|
||||
}
|
||||
@ -287,7 +289,10 @@ class Server {
|
||||
cleanupProcess = () => {
|
||||
console.log("🛑 Stopping server...")
|
||||
|
||||
this.httpInterface.close()
|
||||
if (typeof this.httpInterface.close === "function") {
|
||||
this.httpInterface.close()
|
||||
}
|
||||
|
||||
this.wsInterface.io.close()
|
||||
|
||||
process.exit(1)
|
||||
@ -368,6 +373,7 @@ class Server {
|
||||
console.log(`🌐 Server info:`)
|
||||
console.table({
|
||||
"ID": this.id,
|
||||
"HTTPEngine": this.params.httpEngine,
|
||||
"Version": LINEBRIDGE_SERVER_VERSION,
|
||||
"HTTP address": this.HTTPAddress,
|
||||
"WS address": this.WSAddress,
|
||||
|
Loading…
x
Reference in New Issue
Block a user