- } else {
- //This condition will occure when Old Helium openflowplugin implementation will be used.
- shutdownPoolPolitely();
- }
- }
-
- private void shutdownPoolPolitely() {
- LOG.debug("Terminating handshake pool for node {}", connectionAdapter.getRemoteAddress());
- hsPool.shutdown();
- try {
- hsPool.awaitTermination(1, TimeUnit.SECONDS);
- } catch (InterruptedException e) {
- LOG.debug("Error while awaiting termination of pool. Will force shutdown now.");
- } finally {
- hsPool.purge();
- if (!hsPool.isTerminated()) {
- hsPool.shutdownNow();
- }
- LOG.debug("is handshake pool for node {} is terminated : {}",
- connectionAdapter.getRemoteAddress(), hsPool.isTerminated());