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

Retry initial sync forever #234

Merged
merged 1 commit into from
Mar 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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