mirror of
https://github.com/ragestudio/linebridge.git
synced 2025-06-10 19:14: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")()
|
return require("nanoexpress")()
|
||||||
},
|
},
|
||||||
"express": () => {
|
"express": () => {
|
||||||
|
|
||||||
|
|
||||||
return require("express")()
|
return require("express")()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -287,7 +289,10 @@ class Server {
|
|||||||
cleanupProcess = () => {
|
cleanupProcess = () => {
|
||||||
console.log("🛑 Stopping server...")
|
console.log("🛑 Stopping server...")
|
||||||
|
|
||||||
this.httpInterface.close()
|
if (typeof this.httpInterface.close === "function") {
|
||||||
|
this.httpInterface.close()
|
||||||
|
}
|
||||||
|
|
||||||
this.wsInterface.io.close()
|
this.wsInterface.io.close()
|
||||||
|
|
||||||
process.exit(1)
|
process.exit(1)
|
||||||
@ -368,6 +373,7 @@ class Server {
|
|||||||
console.log(`🌐 Server info:`)
|
console.log(`🌐 Server info:`)
|
||||||
console.table({
|
console.table({
|
||||||
"ID": this.id,
|
"ID": this.id,
|
||||||
|
"HTTPEngine": this.params.httpEngine,
|
||||||
"Version": LINEBRIDGE_SERVER_VERSION,
|
"Version": LINEBRIDGE_SERVER_VERSION,
|
||||||
"HTTP address": this.HTTPAddress,
|
"HTTP address": this.HTTPAddress,
|
||||||
"WS address": this.WSAddress,
|
"WS address": this.WSAddress,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user