Skip to content

Commit a68ab86

Browse files
committed
fix pool callback context
1 parent de3a910 commit a68ab86

File tree

1 file changed

+1
-2
lines changed
  • packages/datadog-instrumentations/src

1 file changed

+1
-2
lines changed

packages/datadog-instrumentations/src/mysql.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ addHook({ name: 'mysql', file: 'lib/Pool.js', versions: ['>=2'] }, Pool => {
8080
const cb = arguments[arguments.length - 1]
8181
if (typeof cb === 'function') {
8282
arguments[arguments.length - 1] = shimmer.wrapFunction(cb, cb => function () {
83-
finish()
84-
return cb.apply(this, arguments)
83+
return finishPoolQueryCh.runStores(ctx, cb, this, arguments)
8584
})
8685
}
8786

0 commit comments

Comments
 (0)