diff --git a/lib/server.js b/lib/server.js index b9f3469..f2a4430 100644 --- a/lib/server.js +++ b/lib/server.js @@ -56,6 +56,10 @@ Server.prototype.update = function (options) { }; Server.prototype.queryStatus = function() { + if (!this.instance) { + return; + } + var self = this; Gamedig.query( { @@ -64,6 +68,10 @@ Server.prototype.queryStatus = function() { port: self.port, }, function(state) { + if (!self.instance) { + return; + } + if(state.error) { self.state = null; } else {