remove listeners on the right object (s/client/res/)

This commit is contained in:
Pedro Palazón Candel 2013-04-30 21:16:45 +03:00
parent 25ffb858ce
commit a796c3efbf
1 changed files with 2 additions and 2 deletions

View File

@ -76,12 +76,12 @@ function createPool(options) {
return callback(err); return callback(err);
res.on('error', function (e) { res.on('error', function (e) {
client.removeAllListeners('end'); res.removeAllListeners('end');
callback(e); callback(e);
}); });
res.on('end', function () { res.on('end', function () {
client.removeAllListeners('error'); res.removeAllListeners('error');
callback(null); callback(null);
}); });