Skip to content

Commit

Permalink
Fixed an issue where if network was down, login was stuck in a loop.
Browse files Browse the repository at this point in the history
  • Loading branch information
Darby Payne committed Feb 10, 2012
1 parent 08673ab commit cee247d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/com/etime/LoginAsyncTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,21 @@ public boolean signon() {

publishProgress(10);
step = 0;
int i=0;
Log.v(TAG, "log in start");
do{
if (i >= 3) {
return false;
}
i++;

page = ETimeUtils.getHtmlPageWithProgress(httpClient, LOGIN_URL, this, 10, 30, LOGIN_URL_PAGE_SIZE);
Log.v(TAG, "page = "+page);
if(page == null)
Log.v(TAG, "Login attemp failed. Retrying...");

}while(page == null);

if (page.contains(LOGIN_FAILED)) {
return false;
}
Expand Down

0 comments on commit cee247d

Please sign in to comment.