mirror of
https://github.com/Dahlgren/arma-server-web-admin.git
synced 2024-08-30 17:22:10 +00:00
Make sure instance is running before applying new state
This commit is contained in:
parent
0bc37645b3
commit
2509417c08
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user