Skip to content

Commit

Permalink
[chore] Improve request cancelation handling in vis embeddable (#65057)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dosant authored May 6, 2020
1 parent 94127d8 commit 6114eba
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -340,13 +340,14 @@ export class VisualizeEmbeddable extends Embeddable<VisualizeInput, VisualizeOut
this.abortController.abort();
}
this.abortController = new AbortController();
const abortController = this.abortController;
this.expression = await buildPipeline(this.vis, {
timefilter: this.timefilter,
timeRange: this.timeRange,
abortSignal: this.abortController!.signal,
});

if (this.handler) {
if (this.handler && !abortController.signal.aborted) {
this.handler.update(this.expression, expressionParams);
}
}
Expand Down

0 comments on commit 6114eba

Please sign in to comment.