aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--connection.cpp3
-rw-r--r--connection.h3
2 files changed, 4 insertions, 2 deletions
diff --git a/connection.cpp b/connection.cpp
index cf08321c..25786361 100644
--- a/connection.cpp
+++ b/connection.cpp
@@ -175,12 +175,13 @@ void Connection::sync(int timeout)
d->syncJob = nullptr;
emit syncDone();
});
+ connect( job, &SyncJob::retryScheduled, this, &Connection::networkError);
connect( job, &SyncJob::failure, [=] () {
d->syncJob = nullptr;
if (job->error() == BaseJob::ContentAccessError)
emit loginError(job->errorString());
else
- emit connectionError(job->errorString());
+ emit syncError(job->errorString());
});
}
diff --git a/connection.h b/connection.h
index a00afc91..849106a1 100644
--- a/connection.h
+++ b/connection.h
@@ -94,8 +94,9 @@ namespace QMatrixClient
void joinedRoom(Room* room);
void loginError(QString error);
- void connectionError(QString error);
+ void networkError(size_t nextAttempt, int inMilliseconds);
void resolveError(QString error);
+ void syncError(QString error);
//void jobError(BaseJob* job);
protected: