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
… (#65636)

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
Dosant and elasticmachine authored May 8, 2020
1 parent 05e890f commit 3c2c4d7
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 3c2c4d7

Please sign in to comment.