pull/206/head
M66B 3 years ago
parent 3e6db5cc34
commit f0215a4e1d

@ -703,7 +703,6 @@ public class IMAPStore extends Store
synchronized (pool) { synchronized (pool) {
pool.authenticatedConnections.addElement(protocol); pool.authenticatedConnections.addElement(protocol);
eu.faircode.email.Log.persist("protocolConnect " + host + ":" + port + " connections=" + pool.getConnections());
} }
} }
} catch (IMAPReferralException ex) { } catch (IMAPReferralException ex) {
@ -1065,7 +1064,6 @@ public class IMAPStore extends Store
// remove the available connection from the Authenticated queue // remove the available connection from the Authenticated queue
p = pool.authenticatedConnections.lastElement(); p = pool.authenticatedConnections.lastElement();
pool.authenticatedConnections.removeElement(p); pool.authenticatedConnections.removeElement(p);
eu.faircode.email.Log.persist("getProtocol " + host + ":" + port + " connections=" + pool.getConnections());
// check if the connection is still live // check if the connection is still live
long lastUsed = System.currentTimeMillis() - p.getTimestamp(); long lastUsed = System.currentTimeMillis() - p.getTimestamp();
@ -1133,7 +1131,6 @@ public class IMAPStore extends Store
if (pool.folders == null) if (pool.folders == null)
pool.folders = new Vector<>(); pool.folders = new Vector<>();
pool.folders.addElement(folder); pool.folders.addElement(folder);
eu.faircode.email.Log.persist("getProtocol " + host + ":" + port + " connections=" + pool.getConnections());
} }
} }
@ -1202,7 +1199,6 @@ public class IMAPStore extends Store
p.addResponseHandler(this); p.addResponseHandler(this);
pool.authenticatedConnections.addElement(p); pool.authenticatedConnections.addElement(p);
eu.faircode.email.Log.persist(host + ":" + port + " connections=" + pool.getConnections());
} else { } else {
// Always use the first element in the Authenticated queue. // Always use the first element in the Authenticated queue.
@ -1359,7 +1355,6 @@ public class IMAPStore extends Store
if (!isConnectionPoolFull()) { if (!isConnectionPoolFull()) {
protocol.addResponseHandler(this); protocol.addResponseHandler(this);
pool.authenticatedConnections.addElement(protocol); pool.authenticatedConnections.addElement(protocol);
eu.faircode.email.Log.persist("releaseProtocol " + host + ":" + port + " connections=" + pool.getConnections());
if (logger.isLoggable(Level.FINE)) if (logger.isLoggable(Level.FINE))
logger.fine( logger.fine(
@ -1374,10 +1369,8 @@ public class IMAPStore extends Store
} }
} }
if (pool.folders != null) { if (pool.folders != null)
pool.folders.removeElement(folder); pool.folders.removeElement(folder);
eu.faircode.email.Log.persist("getProtocol " + host + ":" + port + " connections=" + pool.getConnections());
}
timeoutConnections(); timeoutConnections();
} }
@ -1487,7 +1480,6 @@ public class IMAPStore extends Store
} }
pool.authenticatedConnections.removeAllElements(); pool.authenticatedConnections.removeAllElements();
eu.faircode.email.Log.persist("emptyConnectionPool " + host + ":" + port + " connections=" + pool.getConnections());
} }
pool.logger.fine("removed all authenticated connections from pool"); pool.logger.fine("removed all authenticated connections from pool");
@ -1534,7 +1526,6 @@ public class IMAPStore extends Store
p.removeResponseHandler(this); p.removeResponseHandler(this);
pool.authenticatedConnections.removeElementAt(index); pool.authenticatedConnections.removeElementAt(index);
eu.faircode.email.Log.persist("timeoutConnections " + host + ":" + port + " connections=" + pool.getConnections());
try { try {
p.logout(); p.logout();

Loading…
Cancel
Save