- final BigInteger datapathId = featuresReply != null ? featuresReply.getDatapathId() : BigInteger.ZERO;
- LOG.debug("Actively closing connection: {}, datapathId: {}",
- connectionAdapter.getRemoteAddress(), datapathId);
- connectionState = ConnectionContext.CONNECTION_STATE.RIP;
-
- Future<Void> future = Executors.newSingleThreadExecutor().submit(new Callable<Void>() {
- @Override
- public Void call() throws Exception {
- unregisterOutboundQueue();
- return null;
- }
- });
- try {
- future.get(1, TimeUnit.SECONDS);
- LOG.info("Unregister outbound queue successful.");
- } catch (InterruptedException | TimeoutException | ExecutionException e) {
- LOG.warn("Unregister outbound queue throws exception for node {} ", getSafeNodeIdForLOG());
- LOG.trace("Unregister outbound queue throws exception for node {} ", getSafeNodeIdForLOG(), e);
+ final BigInteger datapathId = Objects.nonNull(featuresReply) ? featuresReply.getDatapathId() : BigInteger.ZERO;
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Actively closing connection: {}, datapathId: {}",
+ connectionAdapter.getRemoteAddress(), datapathId);