diff --git a/lib/client/pool.js b/lib/client/pool.js index 571fbaf..8b03dde 100644 --- a/lib/client/pool.js +++ b/lib/client/pool.js @@ -47,7 +47,9 @@ function createPool(options, clientpool) { client.on('error', function (err) { client.removeAllListeners('connect'); client.removeAllListeners('connectTimeout'); - clientpool.emit('error', err); + if (clientpool.listeners('error').length) { + clientpool.emit('error', err); + } return callback(err); });