diff --git a/src/streaming/net/HTTPLoader.js b/src/streaming/net/HTTPLoader.js index 962abede4f..dc5ed46149 100644 --- a/src/streaming/net/HTTPLoader.js +++ b/src/streaming/net/HTTPLoader.js @@ -295,7 +295,10 @@ function HTTPLoader(cfg) { loader.load(httpRequest); } else { // delay - let delayedRequest = { httpRequest: httpRequest }; + let delayedRequest = { + httpRequest: httpRequest, + config: config + }; delayedRequests.push(delayedRequest); delayedRequest.delayTimeout = setTimeout(function () { if (delayedRequests.indexOf(delayedRequest) === -1) { @@ -366,7 +369,13 @@ function HTTPLoader(cfg) { }); retryRequests = []; - delayedRequests.forEach(x => clearTimeout(x.delayTimeout)); + delayedRequests.forEach(x => { + clearTimeout(x.delayTimeout); + // abort request in order to trigger LOADING_ABANDONED event + if (x.config.request && x.config.abort) { + x.config.abort(x.config.request); + } + }); delayedRequests = []; requests.forEach(x => {