Fix logic for duration that an etag reply indicates connectivity
authorChristian Kamm <mail@ckamm.de>
Thu, 25 Apr 2019 09:52:41 +0000 (11:52 +0200)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 15 Dec 2020 09:58:49 +0000 (10:58 +0100)
This got inverted accidentally when std::chrono was introduced.

For #7160

src/gui/accountstate.cpp

index b2e757448552a09fe6e040e1bc49db19128c815a..dcd17439208e6a973b2ee7bbaa2f09ea5cc5c676 100644 (file)
@@ -230,7 +230,7 @@ void AccountState::checkConnectivity()
     std::chrono::milliseconds polltime = cfg.remotePollInterval();
 
     if (isConnected() && _timeSinceLastETagCheck.isValid()
-        && _timeSinceLastETagCheck.hasExpired(polltime.count())) {
+        && !_timeSinceLastETagCheck.hasExpired(polltime.count())) {
         qCDebug(lcAccountState) << account()->displayName() << "The last ETag check succeeded within the last " << polltime.count() / 1000 << " secs. No connection check needed!";
         return;
     }