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

Closing stream buffering encoder when inactive #590

Closed
wants to merge 1 commit into from

Conversation

nmittler
Copy link
Member

@nmittler nmittler commented Jul 1, 2015

No description provided.

@nmittler
Copy link
Member Author

nmittler commented Jul 1, 2015

@ejona86 PTAL

@Scottmitch @buchgr you may be interested as well, since I'd like to make the same changes to Netty's encoder.

@@ -227,6 +232,8 @@ public void channelInactive(ChannelHandlerContext ctx) throws Exception {
logger.fine("Network channel is closed");
goAwayStatus(goAwayStatus().augmentDescription("Network channel closed"));
cancelPing();
// Close the encoder now to cancel any buffered streams.
encoder().close();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will cause two calls to close the encoder, one here and one in

https://github.com/netty/netty/blob/master/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ConnectionHandler.java#L183

an alternative fix is to alter netty to close the encoders before it notifies stream closure to each stream in that method

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Closing this in favor of fixing in Netty.

@nmittler
Copy link
Member Author

nmittler commented Jul 8, 2015

Closing this ... will be fixed by netty/netty#3961

@nmittler nmittler closed this Jul 8, 2015
@lock lock bot locked as resolved and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants