Skip to content

Resolve bugs#12

Closed
elieLeE wants to merge 2 commits intobdarnell:masterfrom
elieLeE:master
Closed

Resolve bugs#12
elieLeE wants to merge 2 commits intobdarnell:masterfrom
elieLeE:master

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)

@elieLeE elieLeE closed this by deleting the head repository Sep 1, 2025
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