Closed
Conversation
Member
Kriechi
commented
Mar 27, 2016
- cleanup h2 code a bit
- this might fix On Shutdown: flow is None and crashes #907
|
|
||
| if not flow.response: | ||
| self.establish_server_connection(flow) | ||
| if not flow.response and self.establish_server_connection(flow): |
Member
There was a problem hiding this comment.
This looks wrong? Why do we do this here?
Member
Author
There was a problem hiding this comment.
If the http2 layer gets terminated (due to a closed connection), establish_server_connection would go into a weird state in the h2 protocol - so it is easier just to cancel the whole stack of layers, and begin a fresh connection.
Member
There was a problem hiding this comment.
Why don't we just raise a proper exception in establish_server_connection then?
Member
Author
There was a problem hiding this comment.
We can do that. Raising or returning False will have the same effect - it needs to be handled. Right now, nobody cares if it fails.
Do you prefer an exception in this case?
This was referenced Apr 14, 2016
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.