From 8a4992640bf1e8f74316dbbad0d5875182b91bbf Mon Sep 17 00:00:00 2001 From: spalger Date: Thu, 24 Mar 2016 14:35:00 -0700 Subject: [PATCH] [courier/segmentedRequest] mark the request "started" synchronously --- src/ui/public/courier/fetch/request/segmented.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ui/public/courier/fetch/request/segmented.js b/src/ui/public/courier/fetch/request/segmented.js index 71ae5e2fa8b8..7ea9c1893a97 100644 --- a/src/ui/public/courier/fetch/request/segmented.js +++ b/src/ui/public/courier/fetch/request/segmented.js @@ -42,6 +42,8 @@ export default function SegmentedReqProvider(es, Private, Promise, timefilter, c *********/ start() { + super.start(); + this._complete = []; this._active = null; this._segments = []; @@ -61,12 +63,12 @@ export default function SegmentedReqProvider(es, Private, Promise, timefilter, c // parameters via the handle if (_.isFunction(this._initFn)) this._initFn(this._handle); return this._createQueue().then((queue) => { + if (this.stopped) return; + this._all = queue.slice(0); // Send the initial fetch status this._reportStatus(); - - return super.start(); }); }