Revert "http2: Http2StreamChannel now shares options of its parent channel"

This reverts commit 7467106630.
This commit is contained in:
Norman Maurer 2017-03-31 07:45:56 +02:00
parent ef21d5f4ca
commit 40bead56c4
2 changed files with 0 additions and 29 deletions

View File

@ -305,12 +305,6 @@ public final class Http2MultiplexCodec extends ChannelDuplexHandler {
}
channel.pipeline().addLast(handler);
// We need to copy parent's channel options into a child's options to make
// sure they share same allocator, same receive buffer allocator, etc.
//
// See https://github.com/netty/netty/issues/6551
channel.config().setOptions(parentChannel.config().getOptions());
initOpts(channel, options);
initAttrs(channel, attrs);

View File

@ -39,7 +39,6 @@ import org.junit.Before;
import org.junit.Test;
import static io.netty.util.ReferenceCountUtil.release;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
@ -344,28 +343,6 @@ public class Http2MultiplexCodecTest {
assertEquals("bar", channel.attr(key).get());
}
@Test
public void childChannelShouldShareParentsChannelOptions() {
EmbeddedChannel parent = new EmbeddedChannel();
parent.config().setAutoRead(false);
parent.config().setWriteSpinCount(42);
Http2StreamChannelBootstrap b = new Http2StreamChannelBootstrap();
parent.pipeline().addLast(new Http2MultiplexCodec(true, b));
Channel child = b
.parentChannel(parent)
.handler(new TestChannelInitializer())
.connect()
.channel();
assertFalse(child.config().isAutoRead());
assertEquals(child.config().getWriteSpinCount(), 42);
child.close();
assertTrue(!parent.finish());
}
@Test
public void outboundStreamShouldWriteGoAwayWithoutReset() {
childChannelInitializer.handler = new ChannelInboundHandlerAdapter() {