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

Resolve bugs #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Resolve bugs #12

wants to merge 2 commits into from

Conversation

elieLeE
Copy link

@elieLeE elieLeE commented Jan 13, 2023

Resolve error wehen send data with size bigger than max size => partionning data in packets.
Remove StreamClosedError at closing connection

@bdarnell
Copy link
Owner

Thanks for the patches, it's good to see someone trying out this library!

For the max packet size check, I think it's better to do this chunking at a higher level. Specifically, you're duplicating the same frame.flags for each packet, which looks incorrect for at least the END_STREAM flag. In Stream.write_chunk we are already doing chunking based on the window size, so I think we could apply the max frame size here as well:

allowance = yield self.window.consume(min(len(chunk), max_size)

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