We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
RetryState.isLastAttempt
1 parent 65e9bc6 commit 6f85ee4Copy full SHA for 6f85ee4
1 file changed
driver-core/src/main/com/mongodb/internal/async/function/RetryState.java
@@ -358,9 +358,10 @@ public boolean isFirstAttempt() {
358
* @see #attempt()
359
*/
360
private boolean isLastAttempt(final Throwable attemptException) {
361
- boolean lastIteration = loopState.isLastIteration();
362
boolean operationTimeout = retryUntilTimeoutThrowsException && attemptException instanceof MongoOperationTimeoutException;
363
- return lastIteration || operationTimeout || attempt() == attempts - 1;
+ boolean attemptLimit = attempt() == attempts - 1;
+ assertFalse(operationTimeout && attemptLimit);
364
+ return loopState.isLastIteration() || operationTimeout || attemptLimit;
365
}
366
367
/**
0 commit comments