Skip to content

Commit 64e1605

Browse files
committed
make Pool connection event emit just the connection and not an error, as pointed out by @dougwilson in issue #486
1 parent d536023 commit 64e1605

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/Pool.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Pool.prototype.getConnection = function (cb) {
4343
return cb(err);
4444
}
4545

46-
this.emit('connection', null, connection);
46+
this.emit('connection', connection);
4747
return cb(null, connection);
4848
}.bind(this));
4949
}

test/integration/pool/test-connection-event.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var Connection = require(common.lib + '/Connection');
44
var pool = common.createPool();
55

66
var connectionEventHappened = false;
7-
pool.on('connection', function(err, connection) {
7+
pool.on('connection', function(connection) {
88
connectionEventHappened = true;
99
})
1010

0 commit comments

Comments
 (0)