clebertsuconic commented on code in PR #4840:
URL: https://github.com/apache/activemq-artemis/pull/4840#discussion_r1514787699


##########
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/AMQPLargeMessageReader.java:
##########
@@ -50,14 +50,15 @@ public DeliveryAnnotations getDeliveryAnnotations() {
    @Override
    public void close() {
       if (!closed) {
-         if (currentMessage != null) {
-            try {
-               currentMessage.deleteFile();
-            } catch (Throwable error) {
-               
ActiveMQServerLogger.LOGGER.errorDeletingLargeMessageFile(error);
-            } finally {
-               currentMessage = null;
+         try {
+            AMQPLargeMessage localCurrentMessage = currentMessage;

Review Comment:
   @gemmellr actually... I am doing another change instead.
   
   
   The AMQPLargeMessage should be created within the session executor.
   
   Right now that's only working because I'm not actually creating a file there 
yet.. but this is a bit fragile.. as anyone could break it..
   
   
   I will move the initialization of the new Object within the addBytes..



-- 
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