ARTEMIS-2408 A few tweaks on acceptor async stop
This commit is contained in:
parent
aeecb6f70b
commit
989b3a516e
|
@ -650,7 +650,7 @@ public class NettyAcceptor extends AbstractAcceptor {
|
||||||
public void stop() throws Exception {
|
public void stop() throws Exception {
|
||||||
CountDownLatch latch = new CountDownLatch(1);
|
CountDownLatch latch = new CountDownLatch(1);
|
||||||
|
|
||||||
asyncStop(() -> latch.countDown());
|
asyncStop(latch::countDown);
|
||||||
|
|
||||||
latch.await();
|
latch.await();
|
||||||
}
|
}
|
||||||
|
|
|
@ -412,7 +412,7 @@ public class RemotingServiceImpl implements RemotingService, ServerConnectionLif
|
||||||
CountDownLatch acceptorCountDownLatch = new CountDownLatch(acceptors.size());
|
CountDownLatch acceptorCountDownLatch = new CountDownLatch(acceptors.size());
|
||||||
for (Acceptor acceptor : acceptors.values()) {
|
for (Acceptor acceptor : acceptors.values()) {
|
||||||
try {
|
try {
|
||||||
acceptor.asyncStop(() -> acceptorCountDownLatch.countDown());
|
acceptor.asyncStop(acceptorCountDownLatch::countDown);
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
ActiveMQServerLogger.LOGGER.errorStoppingAcceptor(acceptor.getName());
|
ActiveMQServerLogger.LOGGER.errorStoppingAcceptor(acceptor.getName());
|
||||||
}
|
}
|
||||||
|
|
|
@ -1269,8 +1269,6 @@ public class ActiveMQServerImpl implements ActiveMQServer {
|
||||||
this.analyzer = null;
|
this.analyzer = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
activateCallbacks.clear();
|
|
||||||
|
|
||||||
if (identity != null) {
|
if (identity != null) {
|
||||||
ActiveMQServerLogger.LOGGER.serverStopped("identity=" + identity + ",version=" + getVersion().getFullVersion(), tempNodeID, getUptime());
|
ActiveMQServerLogger.LOGGER.serverStopped("identity=" + identity + ",version=" + getVersion().getFullVersion(), tempNodeID, getUptime());
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue