clebertsuconic commented on code in PR #6218:
URL: https://github.com/apache/artemis/pull/6218#discussion_r2761496250


##########
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/AMQPLargeMessageWriter.java:
##########
@@ -173,6 +173,11 @@ private void tryDelivering() {
          logger.trace("AMQP Large Message Writer was closed before queued 
write attempt was executed");
          return;
       }
+      if (protonSender.getSession().getConnection().getRemoteState() != 
EndpointState.ACTIVE || 
protonSender.getSession().getConnection().getLocalState() != 
EndpointState.ACTIVE) {

Review Comment:
   What happens is this:
   
   - there's a pending task in the executor to deliver the large message.
   - before the deliver happens, an onRemoteClose is called: 
   ** 
https://github.com/apache/artemis/blob/db04425978c318abeca026b54e34cdd8afe68c1f/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/AMQPConnectionContext.java#L839-L850
   - The Writer is not closed, when the task reaches the execution point the 
Link will have some invalid state.
   
   
   We need to check the isClosed from the session / connection / link somehow. 
or we need to make the onRemoteClose to also close the Writer.
   



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to