Skip to content

Commit 1266572

Browse files
authored
Merge pull request #632 from bencebalogh/631-promiseconnection-use-promise-implementation
#631 PromiseConnection use promise implementation passed to PromisePool
2 parents 79fefdf + f36b2be commit 1266572

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

promise.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,14 +281,15 @@ function PromisePool(pool, Promise) {
281281
util.inherits(PromisePool, EventEmitter);
282282

283283
PromisePool.prototype.getConnection = function() {
284+
var self = this;
284285
var corePool = this.pool;
285286

286287
return new this.Promise(function(resolve, reject) {
287288
corePool.getConnection(function(err, coreConnection) {
288289
if (err) {
289290
reject(err);
290291
} else {
291-
resolve(new PromiseConnection(coreConnection, Promise));
292+
resolve(new PromiseConnection(coreConnection, self.Promise));
292293
}
293294
});
294295
});

0 commit comments

Comments
 (0)