gemmellr commented on code in PR #5158:
URL: https://github.com/apache/activemq-artemis/pull/5158#discussion_r1723650370


##########
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/mirror/AMQPMirrorControllerTarget.java:
##########
@@ -497,6 +535,20 @@ private boolean sendMessage(Message message, 
DeliveryAnnotations deliveryAnnotat
       return true;
    }
 
+   @Override
+   public void close(boolean remoteLinkClose) throws ActiveMQAMQPException {
+      super.close(remoteLinkClose);
+
+      if (scheduledRateDebug != null) {
+         try {
+            scheduledRateDebug.cancel(true);
+         } catch (Throwable logOnly) {
+            logger.debug(logOnly.getMessage(), logOnly);
+         }
+         scheduledRateDebug = null;
+      }

Review Comment:
   I think the 'log with exception' calls pull the message already...in any 
case, maybe add a descriptive string to indicate what is going on.
   
   I think this can possibly be called off the IO thread, in which case the 
_scheduledRateDebug_ null check etc could race with the other usage and 
nulling. So perhaps it should offload that to the connection thread to ensure 
only one is operating?



-- 
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]
For further information, visit: https://activemq.apache.org/contact


Reply via email to