Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
uurien committed Sep 23, 2024
1 parent 8cbae0f commit bd43855
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/datadog-instrumentations/src/mysql2.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,7 @@ addHook({ name: 'mysql2', file: 'lib/pool_cluster.js', versions: ['>=2.3.0'] },

if (abortController.signal.aborted) {
const getConnection = this.getConnection
this.getConnection = function () {
}
this.getConnection = function () {}

let queryCommand
try {
Expand All @@ -250,6 +249,7 @@ addHook({ name: 'mysql2', file: 'lib/pool_cluster.js', versions: ['>=2.3.0'] },
} else {
queryCommand.emit('error', abortController.signal.reason)
}

queryCommand.emit('end')
})

Expand All @@ -270,6 +270,7 @@ addHook({ name: 'mysql2', file: 'lib/pool_cluster.js', versions: ['>=2.3.0'] },
if (typeof values === 'function') {
cb = values
}

process.nextTick(() => {
cb(abortController.signal.reason)
})
Expand Down

0 comments on commit bd43855

Please sign in to comment.