-
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
Trailers sent on idle streams deserve to be sent too. #25
Conversation
Note: this issue blocks grpc/grpc-swift#281. |
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.
one nit... otherwise LGTM
let serverStreamID = try self.assertFramesRoundTrip(frames: [reqFrame, reqBodyFrame], sender: self.clientChannel, receiver: self.serverChannel).first!.streamID | ||
|
||
// Now we can send the next trailers. | ||
try self.assertFramesRoundTrip(frames: [trailerFrame], sender: self.clientChannel, receiver: self.serverChannel) |
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.
XCTAssertNoThrow ?
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.
I'm happy but I agree with @normanmaurer that we should sprinkle some XCTAssertNoThrow
s everywhere :)
I can confirm that this fixes the issue I had been encountering. Thank you so much, Corey! |
Motivation: Due to nghttp2's weird data provider model, all trailers go through a similar send path as data frames. This includes the fact that the data sender can go "idle". If the data sender is idle, and the user sends trailers, we don't bother to tell nghttp2 to ask us for more data, so the trailers sit there forever, feeling sad. Modifications: - Correctly restart the data provider when sending data. Result: Trailers will be emitted when the stream is idle.
I've updated to use |
Thanks, still happy 👌 |
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.
Ship it...
Motivation:
Due to nghttp2's weird data provider model, all trailers go through a
similar send path as data frames. This includes the fact that the data
sender can go "idle". If the data sender is idle, and the user sends
trailers, we don't bother to tell nghttp2 to ask us for more data,
so the trailers sit there forever, feeling sad.
Modifications:
Result:
Trailers will be emitted when the stream is idle.
Resolves #24.