Ignore error due to data being received after stream is already closed#312
Open
Gruek wants to merge 1 commit into
Open
Ignore error due to data being received after stream is already closed#312Gruek wants to merge 1 commit into
Gruek wants to merge 1 commit into
Conversation
|
#312 and #334 are exactly equivalent PRs, so I'll comment on both: elif isinstance(event, h2.events.DataReceived):
stream = self.streams.get(event.stream_id)
if not stream:
# Data received while already closed, nothing to do.
continue
await stream.handle(Body(stream_id=event.stream_id, data=event.data))
self.connection.acknowledge_received_data(
event.flow_controlled_length, event.stream_id
)
elif isinstance(event, h2.events.StreamEnded):
stream = self.streams.get(event.stream_id)
if not stream:
# Response sent before full request received,
# nothing to do already closed.
continue
await stream.handle(EndBody(stream_id=event.stream_id)) |
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.
No description provided.