Skip to content

Commit f36b2be

Browse files
author
Daniel Balogh
committed
#631 PromiseConnection use promise implementation passed to PromisePool
1 parent 8cd97ec commit f36b2be

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
@@ -272,14 +272,15 @@ function PromisePool(pool, Promise) {
272272
util.inherits(PromisePool, EventEmitter);
273273

274274
PromisePool.prototype.getConnection = function() {
275+
var self = this;
275276
var corePool = this.pool;
276277

277278
return new this.Promise(function(resolve, reject) {
278279
corePool.getConnection(function(err, coreConnection) {
279280
if (err) {
280281
reject(err);
281282
} else {
282-
resolve(new PromiseConnection(coreConnection, Promise));
283+
resolve(new PromiseConnection(coreConnection, self.Promise));
283284
}
284285
});
285286
});

0 commit comments

Comments
 (0)