You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (retryableExceptions.contains(e) || e.getCause() instanceofEOFException)
should be if (retryableExceptions.contains(e.getClass()) || e.getCause() instanceof EOFException)
, because retryableExceptions is a set of Classes not a set of exceptions. But actually retryableExceptions.contains(e) can be removed all together, because it is implicit covered by line 44
A more general suggestion of my would be to make recoverable exceptions more configurable. Let users provide predicates if exceptions are recoverable or not, because more often than not you have a whole exception cause chain. And only checking type of the outermost exception does not suffice.
The text was updated successfully, but these errors were encountered:
The API could certainly support a Predicate to determine if a failure should be retryable, and the default predicate could match the retry exceptions list, which the user could still modify. If the user provides there own predicate, it would bypass the default one.
Most likely
lyra/src/main/java/net/jodah/lyra/internal/util/Exceptions.java
Line 46 in ce347a6
should be
if (retryableExceptions.contains(e.getClass()) || e.getCause() instanceof EOFException)
, because retryableExceptions is a set of Classes not a set of exceptions. But actually retryableExceptions.contains(e) can be removed all together, because it is implicit covered by line 44
A more general suggestion of my would be to make recoverable exceptions more configurable. Let users provide predicates if exceptions are recoverable or not, because more often than not you have a whole exception cause chain. And only checking type of the outermost exception does not suffice.
The text was updated successfully, but these errors were encountered: