diff --git a/tcc-transaction-core/src/main/java/org/mengyun/tcctransaction/remoting/netty/NettyRemotingClient.java b/tcc-transaction-core/src/main/java/org/mengyun/tcctransaction/remoting/netty/NettyRemotingClient.java index 3db151e7..020a1310 100644 --- a/tcc-transaction-core/src/main/java/org/mengyun/tcctransaction/remoting/netty/NettyRemotingClient.java +++ b/tcc-transaction-core/src/main/java/org/mengyun/tcctransaction/remoting/netty/NettyRemotingClient.java @@ -119,9 +119,9 @@ protected void initChannel(SocketChannel ch) throws Exception { new LoggingHandler(LogLevel.DEBUG), new IdleStateHandler(0, nettyClientConfig.getChannelMaxIdleTimeSeconds(), 0), new LengthFieldBasedFrameDecoder(nettyClientConfig.getFrameMaxLength(), - 0, 2, 0, - 2), - new LengthFieldPrepender(2), + 0, 4, 0, + 4), + new LengthFieldPrepender(4), new NettyEncoder(serializer), new NettyDecoder(serializer), new HeartBeatReqHandler(), diff --git a/tcc-transaction-core/src/main/java/org/mengyun/tcctransaction/remoting/netty/NettyRemotingServer.java b/tcc-transaction-core/src/main/java/org/mengyun/tcctransaction/remoting/netty/NettyRemotingServer.java index ff922e40..189a3dc7 100644 --- a/tcc-transaction-core/src/main/java/org/mengyun/tcctransaction/remoting/netty/NettyRemotingServer.java +++ b/tcc-transaction-core/src/main/java/org/mengyun/tcctransaction/remoting/netty/NettyRemotingServer.java @@ -134,9 +134,9 @@ protected void initChannel(SocketChannel ch) throws Exception { eventExecutorGroup, new LoggingHandler(LogLevel.DEBUG), new LengthFieldBasedFrameDecoder(nettyServerConfig.getFrameMaxLength(), - 0, 2, 0, - 2), - new LengthFieldPrepender(2), + 0, 4, 0, + 4), + new LengthFieldPrepender(4), new NettyDecoder(serializer), new NettyEncoder(serializer), new ReadTimeoutHandler(nettyServerConfig.getChannelIdleTimeoutSeconds()),