Skip to content

Commit

Permalink
Pass pool to factory.create
Browse files Browse the repository at this point in the history
  • Loading branch information
cressie176 committed Aug 8, 2023
1 parent 40f5966 commit f19e50f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ module.exports = class Pool extends EventEmitter {
async _createResource() {
debug('[%d] Creating resource', getContextId());
try {
return await this._factory.create();
return await this._factory.create(this);
} catch (cause) {
debug('[%d] Resource creation failed: %s', getContextId(), cause.message);
const err = new ResourceCreationFailed('Error creating resource', { cause });
Expand Down

0 comments on commit f19e50f

Please sign in to comment.