diff --git a/lib/client/client.js b/lib/client/client.js index 5d47221..c26ec0e 100644 --- a/lib/client/client.js +++ b/lib/client/client.js @@ -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); }