Fix lack of updating of server information

This commit is contained in:
Thomas Smyth 2020-05-15 19:56:03 +01:00
parent 17cfe83b44
commit 6a85afadf2

View File

@ -56,14 +56,14 @@ export default class Server extends EventEmitter {
this.updateInterval this.updateInterval
); );
setTimeout(async () => { setInterval(async () => {
const data = await this.rcon.getMapInfo(); const data = await this.rcon.getMapInfo();
this.currentLayer = data.currentLayer; this.currentLayer = data.currentLayer;
this.nextLayer = data.nextLayer; this.nextLayer = data.nextLayer;
this.emit(SERVER_LAYERS_UPDATED, data); this.emit(SERVER_LAYERS_UPDATED, data);
}, this.updateInterval); }, this.updateInterval);
setTimeout(async () => { setInterval(async () => {
const data = await Gamedig.query({ const data = await Gamedig.query({
type: 'squad', type: 'squad',
host: this.host, host: this.host,