Skip to content

Commit

Permalink
Add return statements for promises to fix Bluebird errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cody Lundquist committed Sep 12, 2016
1 parent d6f55dd commit 9a2d725
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Pool.prototype.getConnection = function() {
}

if (self._slowGrowth === false) {
self._expandBuffer();
return self._expandBuffer();
}

});
Expand Down Expand Up @@ -245,7 +245,7 @@ Pool.prototype.createConnection = function() {

// Not sure what happened here, so let's be safe and close this connection.
connection.close().then(function() {
self._expandBuffer();
return self._expandBuffer();
}).error(function(e) {
// We failed to close this connection, but we removed it from the pool... so err, let's just ignore that.
self._expandBuffer();
Expand Down Expand Up @@ -318,7 +318,7 @@ Pool.prototype._expandBuffer = function() {
if ((this._draining === false) &&
(this._pool.getLength() < this.options.buffer+this._localhostToDrain) &&
(this._numConnections < this.options.max+this._localhostToDrain)) {
this.createConnection();
return this.createConnection();
}
}

Expand Down

0 comments on commit 9a2d725

Please sign in to comment.