Bughue commented on code in PR #6697:
URL: https://github.com/apache/incubator-seata/pull/6697#discussion_r1690673505


##########
core/src/main/java/org/apache/seata/core/rpc/netty/v0/ProtocolDecoderV0.java:
##########
@@ -144,22 +144,15 @@ public RpcMessage decodeFrame(ByteBuf in) {
 
     @Override
     protected Object decode(ChannelHandlerContext ctx, ByteBuf in) throws 
Exception {
-        Object decoded;
         try {
-            decoded = super.decode(ctx, in);
-            if (decoded instanceof ByteBuf) {
-                ByteBuf frame = (ByteBuf)decoded;
-                try {
-                    return decodeFrame(frame);
-                } finally {
-                    frame.release();
-                }
+            if (in instanceof ByteBuf) {
+                return decodeFrame(in);
             }
         } catch (Exception exx) {
             LOGGER.error("Decode frame error, cause: {}", exx.getMessage());
             throw new DecodeException(exx);
         }
-        return decoded;
+        return in;

Review Comment:
   Running here means that an exception or incorrect type was encountered. 
   Follow the original logic, skip this processing, return **in**



-- 
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: notifications-unsubscr...@seata.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org
For additional commands, e-mail: notifications-h...@seata.apache.org

Reply via email to