-
Notifications
You must be signed in to change notification settings - Fork 4
refactor: improve error storage for closed connections #184
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
base: protocol-simplification
Are you sure you want to change the base?
refactor: improve error storage for closed connections #184
Conversation
a7363ea to
ea37469
Compare
matheus23
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't super like that the tests change... But the way they change still kind of make sense, so maybe it's fine?
Is the difference between actual ConnectionErrors vs. TransportError and LocallyClosed maybe that anytime you get a ConnectionError it's the "negotiated" error between you and the other side? Whereas you can return LocallyClosed immediately when you call Connection::close() from somewhere else, and similarly you can return TransportError immediately once you realize the certificate doesn't match.
But it doesn't necessarily mean that the connection error is the one you "negotiated" with the other side if that makes sense. (Where "negotiated" means it's the final error of the connection after you've drained it to make sure the other side hasn't reported a possibly different error?)
matheus23
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like this! We should squash-merge this IMO. (I have the minor nit above, but that's easy enough to fix)
1807225 to
9d1a2fa
Compare
9d1a2fa to
9dcc6a0
Compare
No description provided.