Fix NullPointerException on server unavailable
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2156 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
efdec3e3c5
commit
284fe9bce0
|
@ -530,6 +530,7 @@ public abstract class ExchangeSession {
|
|||
// try to get new method from script based redirection
|
||||
logonMethod = buildLogonMethod(httpClient, logonMethod);
|
||||
|
||||
if (logonMethod != null) {
|
||||
if (otpPreAuthFound && otpPreAuthRetries < MAX_OTP_RETRIES) {
|
||||
// A OTP pre-auth page has been found, it is needed to restart the login process.
|
||||
// This applies to both the case the user entered a good OTP code (the usual login process
|
||||
|
@ -538,7 +539,6 @@ public abstract class ExchangeSession {
|
|||
return postLogonMethod(httpClient, logonMethod, userName, password);
|
||||
}
|
||||
|
||||
if (logonMethod != null) {
|
||||
// if logonMethod is not null, try to follow redirection
|
||||
logonMethod = DavGatewayHttpClientFacade.executeFollowRedirects(httpClient, logonMethod);
|
||||
checkFormLoginQueryString(logonMethod);
|
||||
|
|
Loading…
Reference in New Issue