summaryrefslogtreecommitdiffstats
path: root/assets/js
diff options
context:
space:
mode:
authorOmar Roth <omarroth@protonmail.com>2019-06-22 20:08:11 -0500
committerOmar Roth <omarroth@protonmail.com>2019-06-22 20:08:37 -0500
commitcc6d6ddd66b56b8c234c2af19cc38a4c1d26c9f2 (patch)
tree3ddf2b1a53ccfcab608646a353f4db2c89cac25b /assets/js
parent6a6cf015a6fc6774afd667c457f9134d9a11050c (diff)
downloadinvidious-cc6d6ddd66b56b8c234c2af19cc38a4c1d26c9f2.tar.gz
invidious-cc6d6ddd66b56b8c234c2af19cc38a4c1d26c9f2.tar.bz2
invidious-cc6d6ddd66b56b8c234c2af19cc38a4c1d26c9f2.zip
Prevent firing _onStreamProgress after aborting
Diffstat (limited to 'assets/js')
-rw-r--r--assets/js/sse.js2
1 files changed, 1 insertions, 1 deletions
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;
}