Skip to content

Commit dc1a67a

Browse files
committed
Correctly handle timeouts in oauth
1 parent 844fb42 commit dc1a67a

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

changelog/unreleased/10373

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Bugfix: Correctly detect timeouts during token refrshs
2+
3+
https://github.com/owncloud/client/pull/10373

src/libsync/creds/httpcredentials.cpp

+6-3
Original file line numberDiff line numberDiff line change
@@ -293,12 +293,15 @@ bool HttpCredentials::refreshAccessTokenInternal(int tokenRefreshRetriesCount)
293293
timeout = 0s;
294294
break;
295295
case QNetworkReply::HostNotFoundError:
296-
Q_FALLTHROUGH();
296+
[[fallthrough]];
297297
case QNetworkReply::TimeoutError:
298-
Q_FALLTHROUGH();
298+
[[fallthrough]];
299+
// Qt reports OperationCanceledError if the request timed out
300+
case QNetworkReply::OperationCanceledError:
301+
[[fallthrough]];
299302
case QNetworkReply::TemporaryNetworkFailureError:
300303
nextTry = 0;
301-
Q_FALLTHROUGH();
304+
[[fallthrough]];
302305
default:
303306
timeout = 30s;
304307
}

0 commit comments

Comments
 (0)