ARTEMIS-2408 A few tweaks on acceptor async stop

This commit is contained in:
Clebert Suconic 2019-07-18 16:23:19 -04:00
parent aeecb6f70b
commit 989b3a516e
3 changed files with 2 additions and 4 deletions

View File

@ -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();
}

View File

@ -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());
}

View File

@ -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 {