Remove heartbeat when client exits mrc
This commit is contained in:
parent
27e3d50c5d
commit
2c3219fc67
|
@ -112,6 +112,7 @@ exports.getModule = class mrcModule extends MenuModule {
|
||||||
|
|
||||||
quit : (formData, extraArgs, cb) => {
|
quit : (formData, extraArgs, cb) => {
|
||||||
this.sendServerMessage('LOGOFF');
|
this.sendServerMessage('LOGOFF');
|
||||||
|
clearInterval(this.heartbeat);
|
||||||
this.state.socket.destroy();
|
this.state.socket.destroy();
|
||||||
return this.prevMenu(cb);
|
return this.prevMenu(cb);
|
||||||
}
|
}
|
||||||
|
@ -147,7 +148,7 @@ exports.getModule = class mrcModule extends MenuModule {
|
||||||
self.clientConnect();
|
self.clientConnect();
|
||||||
|
|
||||||
// send register to central MRC and get stats every 60s
|
// send register to central MRC and get stats every 60s
|
||||||
setInterval(function () {
|
self.heartbeat = setInterval(function () {
|
||||||
self.sendHeartbeat();
|
self.sendHeartbeat();
|
||||||
self.sendServerMessage('STATS');
|
self.sendServerMessage('STATS');
|
||||||
}, 60000);
|
}, 60000);
|
||||||
|
|
Loading…
Reference in New Issue