Skip to content

Commit

Permalink
fixup weirdness
Browse files Browse the repository at this point in the history
  • Loading branch information
jsumners-nr committed Jan 3, 2025
1 parent 0900074 commit 6d02567
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
5 changes: 1 addition & 4 deletions lib/shim/message-shim/subscribe-consume.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,7 @@ function createConsumerWrapper({ shim, spec, consumer }) {

// Execute the original function and attempt to hook in the transaction
// finish.
let ret = null
try {
ret = shim.applySegment(consumer, tx.baseSegment, true, this, args)
} catch {}
let ret = shim.applySegment(consumer, tx.baseSegment, true, this, args)

if (shim.isPromise(ret)) {
shim.logger.trace('Got a promise, attaching tx %s ending to promise', tx.id)
Expand Down
6 changes: 1 addition & 5 deletions lib/shim/promise-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,11 +416,7 @@ function wrapHandler({ handler, index, argsLength, useAllParams, ctx, shim }) {
promSegment = segment
}

let ret = null
try {
ret = shim.applySegment(handler, promSegment, true, this, arguments)
} catch {}

let ret = shim.applySegment(handler, promSegment, true, this, arguments)
if (ret && typeof ret.then === 'function') {
ret = ctx.handler[symbols.context].continueContext(ret)
}
Expand Down

0 comments on commit 6d02567

Please sign in to comment.