Skip to content

Commit

Permalink
Don't retry fatal errors in DefaultDrmSession
Browse files Browse the repository at this point in the history
Issue:#6334
PiperOrigin-RevId: 269553308
  • Loading branch information
AquilesCanta authored and ojw28 committed Sep 17, 2019
1 parent b34a10b commit 5df2f14
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -566,8 +566,6 @@ private boolean maybeRetryRequest(Message originalMsg, Exception e) {
> loadErrorHandlingPolicy.getMinimumLoadableRetryCount(C.DATA_TYPE_DRM)) {
return false;
}
Message retryMsg = Message.obtain(originalMsg);

IOException ioException =
e instanceof IOException ? (IOException) e : new UnexpectedDrmSessionException(e);
long retryDelayMs =
Expand All @@ -576,7 +574,11 @@ private boolean maybeRetryRequest(Message originalMsg, Exception e) {
/* loadDurationMs= */ SystemClock.elapsedRealtime() - requestTask.startTimeMs,
ioException,
requestTask.errorCount);
sendMessageDelayed(retryMsg, retryDelayMs);
if (retryDelayMs == C.TIME_UNSET) {
// The error is fatal.
return false;
}
sendMessageDelayed(Message.obtain(originalMsg), retryDelayMs);
return true;
}
}
Expand Down

0 comments on commit 5df2f14

Please sign in to comment.