tornado_http2
tornado_http2 copied to clipboard
Resolve bugs
Resolve error wehen send data with size bigger than max size => partionning data in packets. Remove StreamClosedError at closing connection
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)