Updates disableDisconnectError retry condition to be more specific (#22)
Updates disableDisconnectError retry condition to be more specific. Jira: VEX-6518 Reviews Major reviewer (domain expert): @armadilio3 Minor reviewer: @gabriel-rivero
This commit is contained in:
parent
e6dd52a245
commit
39dee21efa
@ -16,7 +16,10 @@ public final class ReactExoplayerLoadErrorHandlingPolicy extends DefaultLoadErro
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getRetryDelayMsFor(LoadErrorInfo loadErrorInfo) {
|
public long getRetryDelayMsFor(LoadErrorInfo loadErrorInfo) {
|
||||||
if (loadErrorInfo.exception instanceof HttpDataSourceException) {
|
if (
|
||||||
|
loadErrorInfo.exception instanceof HttpDataSourceException &&
|
||||||
|
(loadErrorInfo.exception.getMessage() == "Unable to connect" || loadErrorInfo.exception.getMessage() == "Software caused connection abort")
|
||||||
|
) {
|
||||||
// Capture the error we get when there is no network connectivity and keep retrying it
|
// Capture the error we get when there is no network connectivity and keep retrying it
|
||||||
return 1000; // Retry every second
|
return 1000; // Retry every second
|
||||||
} else if(loadErrorInfo.errorCount < this.minLoadRetryCount) {
|
} else if(loadErrorInfo.errorCount < this.minLoadRetryCount) {
|
||||||
|
Loading…
Reference in New Issue
Block a user