-
Notifications
You must be signed in to change notification settings - Fork 105
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
Raise ConnectionNotAvailable
instead of RemoteProtocolError
on request with terminated HTTP/2 connections
#683
Conversation
If I was going to tackle this I would probably start with just the failing test case(s).
|
…quest with terminated HTTP/2 connections
if isinstance( | ||
self._connection_error_event, h2.events.ConnectionTerminated | ||
): | ||
raise ConnectionNotAvailable(self._connection_error_event) | ||
else: | ||
raise RemoteProtocolError(self._connection_error_event) |
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 love this repeated isinstance
check. We could move it into a utility or just always treat _connection_error_event
as ConnectionNotAvailable
instead of a protocol error.
Failing coverage checks now. I didn't add a test at the connection pool level yet. There are not HTTP/2 examples there, but it doesn't seem hard to add a mock stream as you suggested. Feel free to push changes. |
I've added issue #730 so that we're tracking this neatly. |
Thanks! Now superseeded by #733 |
Follow-up to #679 (comment)
Attempts to improve handling of HTTP/2 behavior when connections are terminated.
Refs #730