aboutsummaryrefslogtreecommitdiff
path: root/jobs/syncjob.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2017-03-21 19:01:35 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2017-03-25 17:20:04 +0900
commit0e00f6f74041a5fec528d1511095ea4974150239 (patch)
treeb058caeecea75ce5f0e0f199c7328973c3df4da4 /jobs/syncjob.cpp
parent57980b04c1a9d8bde974683fbae892580aee7466 (diff)
downloadlibquotient-0e00f6f74041a5fec528d1511095ea4974150239.tar.gz
libquotient-0e00f6f74041a5fec528d1511095ea4974150239.zip
Jobs retry on network and timeout errors
As of now, the retry logic (see BaseJob::finishJob() method) invokes the same network request several times with increasing timeouts and retry intervals. Some additional signals and accessors are also provided to control the behaviour from inheriting classes (see a notable example with SyncJob in the same commit) and clients (support of retries in Quaternion comes in a respective commit shortly).
Diffstat (limited to 'jobs/syncjob.cpp')
-rw-r--r--jobs/syncjob.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/jobs/syncjob.cpp b/jobs/syncjob.cpp
index cec9595f..e3421d35 100644
--- a/jobs/syncjob.cpp
+++ b/jobs/syncjob.cpp
@@ -21,8 +21,6 @@
#include <QtCore/QJsonArray>
#include <QtCore/QDebug>
-#include "../connectiondata.h"
-
using namespace QMatrixClient;
class SyncJob::Private
@@ -50,6 +48,8 @@ SyncJob::SyncJob(ConnectionData* connection,
if( !since.isEmpty() )
query.addQueryItem("since", since);
setRequestQuery(query);
+
+ setMaxRetries(std::numeric_limits<int>::max());
}
SyncJob::~SyncJob()