mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-25 08:23:13 +09:00
Don't spam internal errors when server is paused/shutting down
This commit is contained in:
1 parent
b7f76bf451
commit
e4c276054b
2 files changed
+4
-3
No files matched your search
@@ -88,11 +88,12 @@ async function messageInterfaceInternal(command, callback, resolve, reject) {
|
|||||||
if(typeof callback == "function") callback(str)
|
if(typeof callback == "function") callback(str)
|
||||||
resolve(str)
|
resolve(str)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.log("RCON failed, server might be paused or shutting down");
|
||||||
|
// console.log(err);
|
||||||
|
// reject(err);
|
||||||
if(typeof callback == "function"){
|
if(typeof callback == "function"){
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
reject(err)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1079,7 +1079,7 @@ class wsSlave {
|
|||||||
runCommand(command, callback){
|
runCommand(command, callback){
|
||||||
let commandID = Math.random().toString();
|
let commandID = Math.random().toString();
|
||||||
this.socket.emit("runCommand", {command, commandID});
|
this.socket.emit("runCommand", {command, commandID});
|
||||||
this.commandsWaitingForReturn[commandID] = {callback, timestamp: Date.now()};
|
if(commandID) this.commandsWaitingForReturn[commandID] = {callback, timestamp: Date.now()};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
io.on('connection', function (socket) {
|
io.on('connection', function (socket) {
|
||||||
|
|||||||
Reference in new issue
Block a user