diff --git a/lib/client/client.js b/lib/client/client.js index 76ea222..d111ec2 100644 --- a/lib/client/client.js +++ b/lib/client/client.js @@ -1013,6 +1013,8 @@ Client.prototype.connect = function connect () { // Communicate the last-encountered error if (err instanceof ConnectionError) { self.emit('connectTimeout', err) + } else if (err.code === 'ECONNREFUSED') { + self.emit('connectRefused', err) } else { self.emit('error', err) }