Prevent firing _onStreamProgress after aborting

This commit is contained in:
Omar Roth 2019-06-22 20:08:11 -05:00
parent 6a6cf015a6
commit cc6d6ddd66
No known key found for this signature in database
GPG Key ID: B8254FB7EC3D37F2

View File

@ -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;
}