You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2019/07/18 20:28:24 UTC

[activemq-artemis] 02/03: ARTEMIS-2408 A few tweaks on acceptor async stop

This is an automated email from the ASF dual-hosted git repository.

clebertsuconic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git

commit 989b3a516e177e039bfa013160bf0cce46037440
Author: Clebert Suconic <cl...@apache.org>
AuthorDate: Thu Jul 18 16:23:19 2019 -0400

    ARTEMIS-2408 A few tweaks on acceptor async stop
---
 .../apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java | 2 +-
 .../activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java | 2 +-
 .../apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java    | 2 --
 3 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java
index ee8c44e..418e9a9 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java
@@ -650,7 +650,7 @@ public class NettyAcceptor extends AbstractAcceptor {
    public void stop() throws Exception {
       CountDownLatch latch = new CountDownLatch(1);
 
-      asyncStop(() -> latch.countDown());
+      asyncStop(latch::countDown);
 
       latch.await();
    }
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java
index 24dc727..2faa8b2 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java
@@ -412,7 +412,7 @@ public class RemotingServiceImpl implements RemotingService, ServerConnectionLif
       CountDownLatch acceptorCountDownLatch = new CountDownLatch(acceptors.size());
       for (Acceptor acceptor : acceptors.values()) {
          try {
-            acceptor.asyncStop(() -> acceptorCountDownLatch.countDown());
+            acceptor.asyncStop(acceptorCountDownLatch::countDown);
          } catch (Throwable t) {
             ActiveMQServerLogger.LOGGER.errorStoppingAcceptor(acceptor.getName());
          }
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
index 24be17c..68ca620 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
@@ -1269,8 +1269,6 @@ public class ActiveMQServerImpl implements ActiveMQServer {
          this.analyzer = null;
       }
 
-      activateCallbacks.clear();
-
       if (identity != null) {
          ActiveMQServerLogger.LOGGER.serverStopped("identity=" + identity + ",version=" + getVersion().getFullVersion(), tempNodeID, getUptime());
       } else {