Skip to content

Commit

Permalink
dont log on abort
Browse files Browse the repository at this point in the history
  • Loading branch information
boufni95 committed Oct 26, 2024
1 parent c01ee1a commit b21c24a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/services/lnd/lnd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,12 +472,14 @@ export default class {
}, { abort: abortController.signal })
return new Promise((res, rej) => {
stream.responses.onError(error => {
this.log(ERROR, "error with trackPaymentV2", error.message)
rej(null)
if (abortController.signal.aborted) {
this.log(ERROR, "error with trackPaymentV2", error.message)
rej(null)
}
})
stream.responses.onMessage(payment => {
abortController.abort()
res(payment)
abortController.abort()
})
})

Expand Down

0 comments on commit b21c24a

Please sign in to comment.