Skip to content

Commit ab7c49f

Browse files
fix(createPoolCluster): add pattern and selector to promise-based getConnection (#3017)
The implementation of `PromisePoolCluster#getConnection` does not match the capabilities of `PoolCluster#getConnection` nor the definition in `promise.d.ts`. This change corrects this by adding the missing `pattern` and `selector` parameters which are passed through to the underlying method. Fixes #1381
1 parent dc3a680 commit ab7c49f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

promise.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -451,10 +451,10 @@ class PromisePoolCluster extends EventEmitter {
451451
inheritEvents(poolCluster, this, ['warn', 'remove']);
452452
}
453453

454-
getConnection() {
454+
getConnection(pattern, selector) {
455455
const corePoolCluster = this.poolCluster;
456456
return new this.Promise((resolve, reject) => {
457-
corePoolCluster.getConnection((err, coreConnection) => {
457+
corePoolCluster.getConnection(pattern, selector, (err, coreConnection) => {
458458
if (err) {
459459
reject(err);
460460
} else {

0 commit comments

Comments
 (0)