Skip to content

Commit 5cfb824

Browse files
theodabjoeyparrish
authored andcommitted
fix: Silence aborted errors from PreloadManager. (#7619)
Closes #7618
1 parent bf28cb2 commit 5cfb824

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/media/preload_manager.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,12 @@ shaka.media.PreloadManager = class extends shaka.util.FakeEventTarget {
403403

404404
this.successPromise_.resolve();
405405
} catch (error) {
406-
this.successPromise_.reject(error);
406+
// Ignore OPERATION_ABORTED and OBJECT_DESTROYED errors.
407+
if (!(error instanceof shaka.util.Error) ||
408+
(error.code != shaka.util.Error.Code.OPERATION_ABORTED &&
409+
error.code != shaka.util.Error.Code.OBJECT_DESTROYED)) {
410+
this.successPromise_.reject(error);
411+
}
407412
}
408413
})();
409414
}

0 commit comments

Comments
 (0)