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) => {
|
||||
this.sendServerMessage('LOGOFF');
|
||||
clearInterval(this.heartbeat);
|
||||
this.state.socket.destroy();
|
||||
return this.prevMenu(cb);
|
||||
}
|
||||
|
@ -147,7 +148,7 @@ exports.getModule = class mrcModule extends MenuModule {
|
|||
self.clientConnect();
|
||||
|
||||
// send register to central MRC and get stats every 60s
|
||||
setInterval(function () {
|
||||
self.heartbeat = setInterval(function () {
|
||||
self.sendHeartbeat();
|
||||
self.sendServerMessage('STATS');
|
||||
}, 60000);
|
||||
|
|
Loading…
Reference in New Issue