jeanouii commented on code in PR #1666:
URL: https://github.com/apache/activemq/pull/1666#discussion_r2929959995
##########
activemq-client/src/main/java/org/apache/activemq/ActiveMQConnection.java:
##########
@@ -2046,20 +2048,40 @@ public void onAsyncException(Throwable error) {
@Override
public void onException(final IOException error) {
- onAsyncException(error);
- executeAsync(() -> {
- transportFailed(error);
- ServiceSupport.dispose(ActiveMQConnection.this.transport);
- brokerInfoReceived.countDown();
+ if (!closed.get() && !closing.get()) {
Review Comment:
This is the purpose of the change.
We can have the 2 listeners executed in their own thread, because we can't
guarantee the order and we can't guarantee that the exception listener will be
triggered before the transport failed.
The only to guarantee the order is to run the 2 in the same async thread.
--
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