Fix reconnect abort logic on client.destroy()
This commit is contained in:
parent
41f99c5b1a
commit
a0fd56d7b3
|
@ -940,9 +940,11 @@ Client.prototype._connect = function _connect() {
|
|||
}
|
||||
this.connecting = true;
|
||||
retry.start();
|
||||
// Abbord reconnection attemps if client is destroyed
|
||||
// Abort reconnection attempts if client is destroyed
|
||||
this.on('destroy', function () {
|
||||
if (retry.isRunning()) {
|
||||
retry.abort();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue