Fix client initiation of multiple reconnect ops
If the client queue was enabled and requests were made during the reconnect process (but after one unsuccessful connection attempt), they would spawn concurrent reconnection attempts.
This commit is contained in:
parent
c7cd5da208
commit
4bd454e608
|
@ -939,9 +939,9 @@ Client.prototype._connect = function _connect() {
|
|||
return;
|
||||
}
|
||||
connectSocket(function (err) {
|
||||
self.connecting = false;
|
||||
if (!err) {
|
||||
postSetup();
|
||||
self.connecting = false;
|
||||
self.connected = true;
|
||||
self.emit('connect', socket);
|
||||
self.log.debug('connected after %d attempt(s)', num+1);
|
||||
|
|
Loading…
Reference in New Issue