Merge from pfmooney/client-pool-events

Fix mcavage/node-ldapjs#162
This commit is contained in:
Patrick Mooney 2014-01-17 15:33:11 -06:00
commit 7bacfb676e
1 changed files with 3 additions and 1 deletions

View File

@ -47,7 +47,9 @@ function createPool(options, clientpool) {
client.on('error', function (err) {
client.removeAllListeners('connect');
client.removeAllListeners('connectTimeout');
if (clientpool.listeners('error').length) {
clientpool.emit('error', err);
}
return callback(err);
});