Skip to content

Commit

Permalink
fix: then and catch order
Browse files Browse the repository at this point in the history
Signed-off-by: naseemkullah <[email protected]>
  • Loading branch information
naseemkullah committed Apr 12, 2021
1 parent b373c9a commit 71781ec
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,14 @@ export class BatchSpanProcessor implements SpanProcessor {
if (this._timer !== undefined) return;
this._timer = setTimeout(() => {
this._flushOneBatch()
.catch(e => {
globalErrorHandler(e);
})
.then(() => {
if (this._finishedSpans.length > 0) {
this._clearTimer();
this._maybeStartTimer();
}
})
.catch(e => {
globalErrorHandler(e);
});
}, this._scheduledDelayMillis);
unrefTimer(this._timer);
Expand Down

0 comments on commit 71781ec

Please sign in to comment.