-
Notifications
You must be signed in to change notification settings - Fork 84
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
Fix parent channel read()
call on HTTP2StreamChannel
initialization causing incorrect order of inbound HTTP2Frame
s
#413
Conversation
channel.configureInboundStream(initializer: self.inboundStreamStateInitializer) | ||
channel.receiveInboundFrame(frame) | ||
channel.configureInboundStream(initializer: self.inboundStreamStateInitializer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is quite subtle. Can we add a comment here that this order is important.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely; done
@swift-server-bot test this please |
@swift-server-bot test this please |
Locally your test crashes for me:
|
@Lukasa looking into this... |
@Lukasa Apparently caused by the switch to the non-deprecated |
…on causing incorrect order of inbound `HTTP2Frame`s Motivation: Make sure the order of `HTTP2Frame`s that are fired through the pipeline of a `HTTP2StreamChannel` by `HTTP2CommonInboundStreamMultiplexer` is correct when a `read()` call on the parent channel synchronously causes further frames to be processed. Modifications: Reorder calls in `HTTP2CommonInboundStreamMultiplexer.receivedFrame(frame:context:multiplexer)` so that initial header frame is buffered and processed first. Result: Resolves apple#410 and makes newly added test case `HTTP2StreamMultiplexerTests.testMultiplexerFiresInitialFramesInCorrectOrder()` pass.
@swift-server-bot test this please if I'm allowed to trigger that |
@swift-server-bot add to allowlist |
Motivation:
Make sure the order of
HTTP2Frame
s that are fired through the pipeline of aHTTP2StreamChannel
byHTTP2CommonInboundStreamMultiplexer
is correct when aread()
call on the parent channel synchronously causes further frames to be processed.Modifications:
Reorder calls in
HTTP2CommonInboundStreamMultiplexer.receivedFrame(frame:context:multiplexer)
so that initial header frame is buffered and processed first.Result:
Resolves #410 and makes newly added test case
HTTP2StreamMultiplexerTests.testMultiplexerFiresInitialFramesInCorrectOrder()
pass.