Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add limited constant retry strategy. #43

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

MichaelGrupp
Copy link
Contributor

No description provided.

@@ -48,7 +57,7 @@ RetryIndicator CreateUnlimitedRetryIndicator(
const std::set<::grpc::StatusCode> &unrecoverable_codes) {
return
[unrecoverable_codes](int failed_attempts, const ::grpc::Status &status) {
return unrecoverable_codes.count(status.error_code()) <= 0;
return !unrecoverable_codes.count(status.error_code());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed this because it didn't make sense, count() returns either 1 or 0 for a set.

We can change it to count == 0 if you prefer that style.

@MichaelGrupp
Copy link
Contributor Author

@cschuet This is open since a while, should we merge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants