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

Improve wrapping with the close reason #1142

Merged
merged 1 commit into from
Sep 4, 2020

Conversation

idelpivnitskiy
Copy link
Member

Motivation:

We have two places in DefaultNettyConnection when we may need to wrap
the error with known close reason. We can share this logic in both places
consistently.

Modifications:

  • Use wrapIfReasonIsKnown for RetryableClosureException;
  • Improve wrapIfReasonIsKnown to skip wrapping if the error is already
    wrapped with the same reason;

Result:

Consistent wrapping.

Motivation:

We have two places in `DefaultNettyConnection` when we may need to wrap
the error with known close reason. We can share this logic in both places
consistently.

Modifications:

- Use `wrapIfReasonIsKnown` for `RetryableClosureException`;
- Improve `wrapIfReasonIsKnown` to skip wrapping if the error is already
wrapped with the same reason;

Result:

Consistent wrapping.
@idelpivnitskiy
Copy link
Member Author

@servicetalk-bot test this please

@idelpivnitskiy idelpivnitskiy merged commit 8a77394 into apple:main Sep 4, 2020
@idelpivnitskiy idelpivnitskiy deleted the wrap-close-reason branch September 4, 2020 22:43
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.

2 participants