tmgodinho commented on code in PR #11777:
URL: https://github.com/apache/ignite/pull/11777#discussion_r1897837211


##########
modules/platforms/cpp/network/src/network/length_prefix_codec.cpp:
##########
@@ -45,7 +45,7 @@ namespace ignite
 
         DataBuffer LengthPrefixCodec::Decode(DataBuffer& data)
         {
-            if (packet.IsValid() && packet.Get()->Length() == 
(PACKET_HEADER_SIZE + packetSize))
+            if (packet.IsValid() && packetSize != -1 && packet.Get()->Length() 
== (PACKET_HEADER_SIZE + packetSize))

Review Comment:
   Probably just this nitpick. Joining these two branches with an if-else and 
putting the 2nd case first would be easier to follow.



-- 
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...@ignite.apache.org

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

Reply via email to