lizhanhui commented on code in PR #5463:
URL: https://github.com/apache/rocketmq/pull/5463#discussion_r1012695357


##########
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RemotingCommand.java:
##########
@@ -181,13 +181,12 @@ public static RemotingCommand decode(final ByteBuffer 
byteBuffer) throws Remotin
 
     public static RemotingCommand decode(final ByteBuf byteBuffer) throws 
RemotingCommandException {
         int length = byteBuffer.readableBytes();
-        int oriHeaderLen = byteBuffer.readInt();
-        int headerLength = getHeaderLength(oriHeaderLen);
+        int headerLength = byteBuffer.readInt();

Review Comment:
   According to the frame layout, the first byte of the header length is used 
as a bit-field, flagging how the header is serialized.  Only the following 3 
bytes are actually employed to represent header length. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to