FIX: Refused connections are now handled gracefully
This commit is contained in:
parent
d702c455bd
commit
eda98986f2
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue