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

Error client: return the error via Brand() #215

Merged
merged 2 commits into from
Jan 9, 2022

Conversation

zenhack
Copy link
Contributor

@zenhack zenhack commented Jan 9, 2022

Two related small improvements:

  • errorClient now lets you get at the underlying error via .Brand()
  • isLocalClient uses this fact to skip the unnecessary embargo for error clients.

As mentioned in the second commit message, the latter is changing the behavior back to what it was before isLocalClient was introduced; it was changed in the first place mostly for expediency and this isn't a huge deal, but it is a bit better.

I've found this useful in some debugging I'm doing on a separate branch.
It will also make it easier to detect error clients elsewhere in the
code.
We didn't used to do this, but started doing so for expidiency when
isLocalClient was introduced. It's not really a big deal, but now that
ErrorClients return the error via Brand(), we can detect this fairly
easily and skip the embargo.
@lthibault lthibault merged commit a17ff56 into capnproto:main Jan 9, 2022
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