Skip to content

Commit bc6a79f

Browse files
authored
fix: Silence uncaught rejection errors when closing EME sessions (#7881)
Fixes #4199
1 parent 57992b2 commit bc6a79f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/drm/drm_engine.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1757,7 +1757,7 @@ shaka.drm.DrmEngine = class {
17571757
if (found && !found.updatePromise) {
17581758
shaka.log.debug('Session has expired', session.sessionId);
17591759
this.activeSessions_.delete(session);
1760-
session.close().catch(() => {}); // Silence uncaught rejection errors
1760+
this.closeSession_(session);
17611761
}
17621762
}
17631763

@@ -2116,7 +2116,7 @@ shaka.drm.DrmEngine = class {
21162116
try {
21172117
await shaka.util.Functional.promiseWithTimeout(
21182118
shaka.drm.DrmEngine.CLOSE_TIMEOUT_,
2119-
Promise.all([session.close(), session.closed]));
2119+
Promise.all([session.close().catch(() => {}), session.closed]));
21202120
} catch (e) {
21212121
shaka.log.warning('Timeout waiting for session close');
21222122
}

0 commit comments

Comments
 (0)