From cc6d6ddd66b56b8c234c2af19cc38a4c1d26c9f2 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Sat, 22 Jun 2019 20:08:11 -0500 Subject: [PATCH] Prevent firing _onStreamProgress after aborting --- assets/js/sse.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/sse.js b/assets/js/sse.js index 3601b5af..4f7320b3 100644 --- a/assets/js/sse.js +++ b/assets/js/sse.js @@ -94,7 +94,7 @@ var SSE = function (url, options) { } this._onStreamProgress = function(e) { - if (this.xhr.status !== 200) { + if (this.xhr.status !== 200 && this.readyState !== this.CLOSED) { this._onStreamFailure(e); return; }