We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b891a81 commit 3091a78Copy full SHA for 3091a78
src/session-pool.ts
@@ -459,6 +459,8 @@ export class SessionPool extends EventEmitter implements SessionPoolInterface {
459
throw new Error(errors.Closed);
460
}
461
462
+ // Get the stacktrace of the caller before we call any async methods, as calling an async method will break the stacktrace.
463
+ const frames = trace.get();
464
const startTime = Date.now();
465
const timeout = this.options.acquireTimeout;
466
@@ -492,7 +494,7 @@ export class SessionPool extends EventEmitter implements SessionPoolInterface {
492
494
493
495
496
- this._traces.set(session.id, trace.get());
497
+ this._traces.set(session.id, frames);
498
return session;
499
500
0 commit comments