diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-06-19 15:59:50 +0200 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-06-19 15:59:50 +0200 |
commit | f6ad01c959e19362a0b15779b816432595153d3b (patch) | |
tree | 1e00da865386f580ce1755a9773110aedd29744b /lib/connection.h | |
parent | e17764a1ae81393968dfb747c7b67353c109bc71 (diff) | |
download | libquotient-f6ad01c959e19362a0b15779b816432595153d3b.tar.gz libquotient-f6ad01c959e19362a0b15779b816432595153d3b.zip |
Revert adding a pause between syncs, use sane timeout defaults
This reverts commit b1071cf34b86685c3cdb5004d6112881966a7ce6. Passing
-1 to sync() and, respectively, to SyncJob does not add any timeout;
however, careful reading of the spec reveals that the default value
for the timeout (0) means to return as soon as possible, not as late
as possible. As a consequence, syncLoop() without parameters initiates
a sync polling frenzy, with the client sending a new request as soon as
the previous returns, while the server returns the request as soon as
it practically can, not as soon as another event for the client comes
around.
To fix this, the default value for syncLoop() is changed to 30 seconds.
The recently added msecBetween parameter is abolished; we really don't
want to steer people to classic polling from long polling.
Diffstat (limited to 'lib/connection.h')
-rw-r--r-- | lib/connection.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/connection.h b/lib/connection.h index 47d1844e..48ea4f5e 100644 --- a/lib/connection.h +++ b/lib/connection.h @@ -537,7 +537,7 @@ public slots: void logout(); void sync(int timeout = -1); - void syncLoop(int timeout = -1, int msecBetween = 500); + void syncLoop(int timeout = 30000); void stopSync(); QString nextBatchToken() const; |