diff --git a/lib/client/client.js b/lib/client/client.js index 648581b..27f0202 100644 --- a/lib/client/client.js +++ b/lib/client/client.js @@ -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 () { - retry.abort(); + if (retry.isRunning()) { + retry.abort(); + } }); };