diff --git a/client.js b/client.js index 1777fb77..835e42f8 100644 --- a/client.js +++ b/client.js @@ -88,11 +88,12 @@ async function messageInterfaceInternal(command, callback, resolve, reject) { if(typeof callback == "function") callback(str) resolve(str) } 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"){ callback(); } - reject(err) } } } diff --git a/master.js b/master.js index 331ec83d..f7ccc5e9 100644 --- a/master.js +++ b/master.js @@ -1079,7 +1079,7 @@ class wsSlave { runCommand(command, callback){ let commandID = Math.random().toString(); 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) {