Skip to content

Commit

Permalink
fix: set default values for streaming retry (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
olavloite committed Jul 6, 2020
1 parent 122a997 commit 543373b
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -855,8 +855,9 @@ private static ExponentialBackOff newBackOff() {
return new ExponentialBackOff.Builder()
.setMultiplier(STREAMING_RETRY_SETTINGS.getRetryDelayMultiplier())
.setInitialIntervalMillis(
(int) STREAMING_RETRY_SETTINGS.getInitialRetryDelay().toMillis())
.setMaxIntervalMillis((int) STREAMING_RETRY_SETTINGS.getMaxRetryDelay().toMillis())
Math.max(10, (int) STREAMING_RETRY_SETTINGS.getInitialRetryDelay().toMillis()))
.setMaxIntervalMillis(
Math.max(1000, (int) STREAMING_RETRY_SETTINGS.getMaxRetryDelay().toMillis()))
.setMaxElapsedTimeMillis(Integer.MAX_VALUE) // Prevent Backoff.STOP from getting returned.
.build();
}
Expand Down

0 comments on commit 543373b

Please sign in to comment.