Skip to content

Commit

Permalink
Fix queuing of the fetch user job
Browse files Browse the repository at this point in the history
As we marked the wrong job as auth job, the user job was queued.
This resulted in the reconnection getting stuck.

Fixes: #11274
  • Loading branch information
TheOneRing committed Jan 2, 2024
1 parent 318f236 commit d21ab2a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions changelog/unreleased/11274
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Client stuck in reconnecting

We fixed a bug where the client got stuck while reconnecting to the server.

https://github.com/owncloud/client/issues/11274
4 changes: 2 additions & 2 deletions src/gui/fetchserversettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ void FetchServerSettingsJob::start()
_account->setCapabilities({_account->url(), caps.toVariantMap()});
if (checkServerInfo()) {
auto *userJob = new JsonApiJob(_account, QStringLiteral("ocs/v2.php/cloud/user"), SimpleNetworkJob::UrlQuery{}, QNetworkRequest{}, this);
job->setAuthenticationJob(isAuthJob());
job->setTimeout(timeoutC);
userJob->setAuthenticationJob(isAuthJob());
userJob->setTimeout(timeoutC);
QObject::connect(userJob, &JsonApiJob::finishedSignal, this, [userJob, this] {
const auto userData = userJob->data().value(QStringLiteral("ocs")).toObject().value(QStringLiteral("data")).toObject();
const QString user = userData.value(QStringLiteral("id")).toString();
Expand Down

0 comments on commit d21ab2a

Please sign in to comment.