Emit error object in case of ConnectionError
This commit is contained in:
parent
540a3a1f5c
commit
bb2d018b2c
|
@ -1223,7 +1223,7 @@ Client.prototype.connect = function connect() {
|
|||
self.log.debug('failed to connect after %d attempts', failAfter);
|
||||
// Communicate the last-encountered error
|
||||
if (err instanceof ConnectionError) {
|
||||
self.emit('connectTimeout');
|
||||
self.emit('connectTimeout', err);
|
||||
} else {
|
||||
self.emit('error', err);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue