Skip to content

Commit

Permalink
Additional change to the forward port of PR #3031
Browse files Browse the repository at this point in the history
  • Loading branch information
violetagg committed Jan 23, 2024
1 parent 70e71d5 commit 12e394c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,7 @@ boolean goAwayReceived() {
ChannelHandlerContext http2FrameCodecCtx() {
ChannelHandlerContext ctx = http2FrameCodecCtx;
// ChannelHandlerContext.isRemoved is only meant to be called from within the EventLoop
if (ctx != null && connection.channel().eventLoop().inEventLoop() && !ctx.isRemoved()) {
if (ctx != null && connection.channel().executor().inEventLoop() && !ctx.isRemoved()) {
return ctx;
}
ctx = connection.channel().pipeline().context(Http2FrameCodec.class);
Expand All @@ -1011,7 +1011,7 @@ ChannelHandlerContext http2FrameCodecCtx() {
ChannelHandlerContext http2MultiplexHandlerCtx() {
ChannelHandlerContext ctx = http2MultiplexHandlerCtx;
// ChannelHandlerContext.isRemoved is only meant to be called from within the EventLoop
if (ctx != null && connection.channel().eventLoop().inEventLoop() && !ctx.isRemoved()) {
if (ctx != null && connection.channel().executor().inEventLoop() && !ctx.isRemoved()) {
return ctx;
}
ctx = connection.channel().pipeline().context(Http2MultiplexHandler.class);
Expand All @@ -1023,7 +1023,7 @@ ChannelHandlerContext http2MultiplexHandlerCtx() {
ChannelHandlerContext h2cUpgradeHandlerCtx() {
ChannelHandlerContext ctx = h2cUpgradeHandlerCtx;
// ChannelHandlerContext.isRemoved is only meant to be called from within the EventLoop
if (ctx != null && connection.channel().eventLoop().inEventLoop() && !ctx.isRemoved()) {
if (ctx != null && connection.channel().executor().inEventLoop() && !ctx.isRemoved()) {
return ctx;
}
ctx = connection.channel().pipeline().context(NettyPipeline.H2CUpgradeHandler);
Expand Down

0 comments on commit 12e394c

Please sign in to comment.