You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/11/28 07:46:04 UTC

[GitHub] [pulsar] Shoothzj commented on a diff in pull request #18650: [fix][client] Release payload when contents are corrupted

Shoothzj commented on code in PR #18650:
URL: https://github.com/apache/pulsar/pull/18650#discussion_r1033211811


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java:
##########
@@ -1258,6 +1258,7 @@ void messageReceived(CommandMessage cmdMessage, ByteBuf headersAndPayload, Clien
         if (!verifyChecksum(headersAndPayload, messageId)) {
             // discard message with checksum error
             discardCorruptedMessage(messageId, cnx, ValidationError.ChecksumMismatch);
+            headersAndPayload.release();

Review Comment:
   @Jason918 Thanks, I have forgot that `finally` block.



-- 
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: commits-unsubscribe@pulsar.apache.org

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