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

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2021-11-22 20:52:43 +0300
committerGhostkeeper <rubend@tutanota.com>2021-11-22 20:52:43 +0300
commit3f92b46ac8fad124aeff09abec65a8a3402bd7a3 (patch)
treeeea6fb75b721eb1e3eb8cd654e55e32401c86a71 /plugins
parent608cce491d82be9b29440e4da7a6a58b5c80d65f (diff)
Don't restart refresh token while it's already processing
If two requests to the API occur at the same time, they will both see at the same time that they need an access token, and if it is expired they will both see that it needs refreshing. The server then sees two refreshes, both with the same refresh token. This is not allowed. The second one then gets a failure to refresh the token, which causes the user to log out. Instead, we'll stop one of the refresh requests. They were fire-and-forget anyway, so it's not needed to actually continue the request. Contributes to issue CURA-8539.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Toolbox/src/CloudSync/CloudPackageChecker.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/Toolbox/src/CloudSync/CloudPackageChecker.py b/plugins/Toolbox/src/CloudSync/CloudPackageChecker.py
index 4c1818e4ee..6d2ed1dcbd 100644
--- a/plugins/Toolbox/src/CloudSync/CloudPackageChecker.py
+++ b/plugins/Toolbox/src/CloudSync/CloudPackageChecker.py
@@ -66,7 +66,7 @@ class CloudPackageChecker(QObject):
self._application.getHttpRequestManager().get(url,
callback = self._onUserPackagesRequestFinished,
error_callback = self._onUserPackagesRequestFinished,
- timeout=10,
+ timeout = 10,
scope = self._scope)
def _onUserPackagesRequestFinished(self, reply: "QNetworkReply", error: Optional["QNetworkReply.NetworkError"] = None) -> None: