clebertsuconic commented on code in PR #4932:
URL: https://github.com/apache/activemq-artemis/pull/4932#discussion_r1606177252
##########
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/AMQPLargeMessageWriter.java:
##########
@@ -170,16 +170,26 @@ private void resume() {
}
private void tryDelivering() {
+
+ final Delivery localDelivery = delivery;
+ final MessageReference localReference = reference;
+ final LargeBodyReader localBodyReader = largeBodyReader;
+
+ if (localDelivery == null || localReference == null || localBodyReader
== null) {
+ logger.debug("Write got closed before tryDelivering was called");
+ return;
+ }
Review Comment:
@gemmellr the exception is a network disconnect. Client disconnects and a
network failure is transmitted. Close is called.
For that we need to either use a cached local variable or add
synchronization.
I suggest we add a local cache as it doesn't really matter if we just send
stuff on the already closed session. Adding synchronization on the write may
risk deadlocks.
I'm not able to fix it this week as I'm going out for a week. if you desire
to pick up this issue please close my PR and open a new one.
I will keep my as draft until I can come back into this.
--
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]