Skip to content
This repository has been archived by the owner on Oct 17, 2019. It is now read-only.

Commit

Permalink
Retry initial sync forever
Browse files Browse the repository at this point in the history
  • Loading branch information
Cadair committed Feb 18, 2018
1 parent 7e2f835 commit 75208de
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
4 changes: 0 additions & 4 deletions include/ChatPage.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,6 @@ private slots:

// LMDB wrapper.
QSharedPointer<Cache> cache_;

// If the number of failures exceeds a certain threshold we
// return to the login page.
int initialSyncFailures_ = 0;
};

template<class Collection>
Expand Down
14 changes: 0 additions & 14 deletions src/ChatPage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
#include "dialogs/ReadReceipts.h"
#include "timeline/TimelineViewManager.h"

constexpr int MAX_INITIAL_SYNC_FAILURES = 7;
constexpr int SYNC_RETRY_TIMEOUT = 40 * 1000;
constexpr int INITIAL_SYNC_RETRY_TIMEOUT = 240 * 1000;

Expand Down Expand Up @@ -951,19 +950,6 @@ ChatPage::retryInitialSync()
return;
}

initialSyncFailures_ += 1;

if (initialSyncFailures_ >= MAX_INITIAL_SYNC_FAILURES) {
initialSyncFailures_ = 0;

deleteConfigs();

emit showLoginPage(
tr("The client couldn't sync with the server. Please try again."));
emit contentLoaded();
return;
}

qWarning() << "Retrying initial sync";

client_->initialSync();
Expand Down

0 comments on commit 75208de

Please sign in to comment.