Emit error object in case of ConnectionError

This commit is contained in:
Vincent van der Weele 2016-03-16 17:01:26 +02:00
parent 540a3a1f5c
commit bb2d018b2c
1 changed files with 1 additions and 1 deletions

View File

@ -1223,7 +1223,7 @@ Client.prototype.connect = function connect() {
self.log.debug('failed to connect after %d attempts', failAfter); self.log.debug('failed to connect after %d attempts', failAfter);
// Communicate the last-encountered error // Communicate the last-encountered error
if (err instanceof ConnectionError) { if (err instanceof ConnectionError) {
self.emit('connectTimeout'); self.emit('connectTimeout', err);
} else { } else {
self.emit('error', err); self.emit('error', err);
} }