if (log.isDebugEnabled()) {
log.debug("Checking for connections, idle timeout: " + idleTimeout);
}
for (Entry<HttpConnection, TimeValues> entry : connectionToTimes.entrySet()) {
HttpConnection conn = entry.getKey();
TimeValues times = entry.getValue();
long connectionTime = times.timeAdded;
if (connectionTime <= idleTimeout) {
if (log.isDebugEnabled()) {
log.debug("Closing idle connection, connection time: " + connectionTime);
}
try {
conn.close();
} catch (IOException ex) {
log.debug("I/O error closing connection", ex);
}
}
}