Improve logging of expired sessions

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@937 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2010-02-02 22:48:40 +00:00
parent 21504d6828
commit f2e862f659
1 changed files with 3 additions and 2 deletions

View File

@ -147,6 +147,7 @@ public final class ExchangeSessionFactory {
ExchangeSession session = currentSession;
try {
if (session.isExpired()) {
ExchangeSession.LOGGER.debug("Session " + session + " expired, trying to open a new one");
session = null;
String baseUrl = Settings.getProperty("davmail.url");
PoolKey poolKey = new PoolKey(baseUrl, userName, password);
@ -157,10 +158,10 @@ public final class ExchangeSessionFactory {
session = getInstance(userName, password);
}
} catch (DavMailAuthenticationException exc) {
throw exc;
} catch (DavMailException exc) {
ExchangeSession.LOGGER.debug("Unable to reopen session", exc);
throw exc;
} catch (Exception exc) {
ExchangeSession.LOGGER.debug("Unable to reopen session", exc);
handleNetworkDown(exc);
}
return session;