/** * Create and start a new HttpConnectionManager, close idle connections every minute. */ public static void start() { synchronized (LOCK) { if (httpConnectionManagerThread == null) { httpConnectionManagerThread = new IdleConnectionTimeoutThread(); httpConnectionManagerThread.setName(IdleConnectionTimeoutThread.class.getSimpleName()); httpConnectionManagerThread.setConnectionTimeout(ONE_MINUTE); httpConnectionManagerThread.setTimeoutInterval(ONE_MINUTE); httpConnectionManagerThread.start(); } } }
idleConnectionTimeoutThread.setTimeoutInterval(idleConnectionCheckInterval);