Skip to content

Commit

Permalink
change to call the callback when error
Browse files Browse the repository at this point in the history
  • Loading branch information
rcanedo committed Oct 8, 2012
1 parent 483e2c6 commit add3742
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/connection-pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ ConnectionPool.prototype.requestConnection = function(callback) {
var self = this;
this.pool.acquire(function(err, connection) {
if(err) {

callback(err, undefined);
}
else {
callback(connection);
callback(undefined, connection);
connection.emit('connect');
}
});
Expand Down

0 comments on commit add3742

Please sign in to comment.