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:
parent
21504d6828
commit
f2e862f659
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue