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
… (#65637)
  • Loading branch information
Dosant authored May 7, 2020
1 parent c4ab557 commit 438c460
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 438c460

Please sign in to comment.