summary refs log tree commit diff
path: root/src/ChatPage.cc
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-10-23 00:19:35 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-10-23 00:19:35 +0300
commitc6e1068e0e1cb8ff5d5982ccd1683b1900dd7114 (patch)
treeb819b0664f4e95004237d00a4ea3a16e0a4677d6 /src/ChatPage.cc
parentUse callbacks on MatrixClient (diff)
downloadnheko-c6e1068e0e1cb8ff5d5982ccd1683b1900dd7114.tar.xz
Lint
Diffstat (limited to 'src/ChatPage.cc')
-rw-r--r--src/ChatPage.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ChatPage.cc b/src/ChatPage.cc

index 65fef9de..d087c3f3 100644 --- a/src/ChatPage.cc +++ b/src/ChatPage.cc
@@ -32,6 +32,7 @@ #include "StateEvent.h" constexpr int MAX_INITIAL_SYNC_FAILURES = 5; +constexpr int SYNC_RETRY_TIMEOUT = 10000; namespace events = matrix::events; @@ -347,7 +348,7 @@ ChatPage::syncFailed(const QString &msg) return; qWarning() << "Sync error:" << msg; - client_->sync(); + QTimer::singleShot(SYNC_RETRY_TIMEOUT, this, [=]() { client_->sync(); }); } // TODO: Should be moved in another class that manages this global list.