public void close() { reaper.shutdown(); if (idleConnectionTimeoutThread != null) { idleConnectionTimeoutThread.shutdown(); idleConnectionTimeoutThread = null; } if (connectionManager != null) { try { connectionManager.shutdown(); } catch (Exception e) { logger.error("Error shutting down connection manager", e); } } }
/** * Stop HttpConnectionManager. */ public static void stop() { synchronized (LOCK) { if (httpConnectionManagerThread != null) { httpConnectionManagerThread.shutdown(); httpConnectionManagerThread.interrupt(); httpConnectionManagerThread = null; } for (MultiThreadedHttpConnectionManager httpConnectionManager : ALL_CONNECTION_MANAGERS) { // try to avoid deadlock by connection manager level lock, // used internally in MultiThreadedHttpConnectionManager.freeConnection() //noinspection SynchronizationOnLocalVariableOrMethodParameter synchronized (httpConnectionManager) { httpConnectionManager.shutdown(); } } } }
log.debug("Shutting down Idle Connection Timeout Thread."); idleConnectionTimeoutThread.shutdown(); } catch (Exception e) { log.warn("Idle connection timeout thread shutdown failed.");
@Override protected void doDispose() { if (!disableCleanupThread) { connectionCleaner.shutdown(); if (!muleContext.getConfiguration().isStandalone()) { MultiThreadedHttpConnectionManager.shutdownAll(); } } if (this.connectionManager != null) { connectionManager.dispose(); connectionManager = null; } super.doDispose(); }
idleConnectionTimeoutThread.shutdown(); idleConnectionTimeoutThread = null;