Skip to content

Commit

Permalink
fix: PortUnification+encodeInIOThread=false cause server response emp…
Browse files Browse the repository at this point in the history
…ty buffer(#12353) (#12355)
  • Loading branch information
AYue-94 committed May 20, 2023
1 parent 08727e8 commit 1671332
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Expand Up @@ -72,7 +72,7 @@ final class NettyChannel extends AbstractChannel {

private final Netty4BatchWriteQueue writeQueue;

private final Codec2 codec;
private Codec2 codec;

private final boolean encodeInIOThread;

Expand Down Expand Up @@ -365,4 +365,8 @@ private static Codec2 getChannelCodec(URL url) {
return frameworkModel.getExtensionLoader(Codec2.class).getExtension("default");
}
}

public void setCodec(Codec2 codec) {
this.codec = codec;
}
}
Expand Up @@ -60,6 +60,7 @@ public void configChannelHandler(List<ChannelHandler> handlerList) {
}

if (!(codec2 instanceof DefaultCodec)){
((NettyChannel) channel).setCodec(codec2);
NettyCodecAdapter codec = new NettyCodecAdapter(codec2, channel.getUrl(), handler);
((NettyChannel) channel).getNioChannel().pipeline().addLast(
codec.getDecoder()
Expand Down

0 comments on commit 1671332

Please sign in to comment.