Revert "http2: Http2StreamChannel now shares options of its parent channel"
This reverts commit 7467106630ad6b2522f7953c244546b91b107efe.
This commit is contained in:
parent
ef21d5f4ca
commit
40bead56c4
@ -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);
|
||||
|
||||
|
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user