Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Kamm <mail@ckamm.de>2017-07-04 13:23:23 +0300
committerMarkus Goetz <markus@woboq.com>2017-07-04 14:12:41 +0300
commit9493e8f42ebf068bc7ac66a187636ca0ce708b8d (patch)
tree0c6ab25aa3e4bba60458e2038a71f50e6cad84d5 /src/gui/accountstate.h
parentb1aaf055b10720fcd2ce93acd869d71526f2a121 (diff)
AccountState: Add a 1-5min reconnection delay #5872
This only applies when the server was explicitly in maintenance mode or when it was 503-unavailable.
Diffstat (limited to 'src/gui/accountstate.h')
-rw-r--r--src/gui/accountstate.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/gui/accountstate.h b/src/gui/accountstate.h
index 450766bf8..2333bcece 100644
--- a/src/gui/accountstate.h
+++ b/src/gui/accountstate.h
@@ -107,10 +107,6 @@ public:
bool isConnected() const;
- /// Triggers a ping to the server to update state and
- /// connection status and errors.
- void checkConnectivity();
-
/** Returns a new settings object for this account, already in the right groups. */
std::unique_ptr<QSettings> settings();
@@ -127,6 +123,11 @@ public:
*/
void tagLastSuccessfullETagRequest();
+public slots:
+ /// Triggers a ping to the server to update state and
+ /// connection status and errors.
+ void checkConnectivity();
+
private:
void setState(State state);
@@ -148,6 +149,18 @@ private:
bool _waitingForNewCredentials;
QElapsedTimer _timeSinceLastETagCheck;
QPointer<ConnectionValidator> _connectionValidator;
+
+ /**
+ * Starts counting when the server starts being back up after 503 or
+ * maintenance mode. The account will only become connected once this
+ * timer exceeds the _maintenanceToConnectedDelay value.
+ */
+ QElapsedTimer _timeSinceMaintenanceOver;
+
+ /**
+ * Milliseconds for which to delay reconnection after 503/maintenance.
+ */
+ int _maintenanceToConnectedDelay;
};
}