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:
Patrick Mooney 2014-06-27 16:48:13 -05:00
parent c7cd5da208
commit 4bd454e608
1 changed files with 1 additions and 1 deletions

View File

@ -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);