Skip to content

Commit

Permalink
Iteration.
Browse files Browse the repository at this point in the history
Signed-off-by: alex-z <[email protected]>
  • Loading branch information
allexzander authored and mgallien committed Jul 4, 2023
1 parent 4cb3bd6 commit 09c5c3e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/gui/accountstate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -560,15 +560,15 @@ void AccountState::slotCheckServerAvailibility()
|| state() == AccountState::SignedOut
|| state() == AccountState::MaintenanceMode
|| state() == AccountState::AskingCredentials) {
qCInfo(lcAccountState) << "Skipping server availibility check for account" << _account->id() << "with state" << state();
qCInfo(lcAccountState) << "Skipping server availibility check for account" << _account->davUser() << "with state" << state();
return;
}
qCInfo(lcAccountState) << "Checking server availibility for account" << _account->id();
qCInfo(lcAccountState) << "Checking server availibility for account" << _account->davUser();
const auto serverAvailibilityUrl = Utility::concatUrlPath(_account->url(), QLatin1String("/index.php/204"));
auto checkServerAvailibilityJob = _account->sendRequest(QByteArrayLiteral("GET"), serverAvailibilityUrl);
connect(checkServerAvailibilityJob, &SimpleNetworkJob::finishedSignal, this, [this](QNetworkReply *reply) {
if (reply->attribute(QNetworkRequest::HttpStatusCodeAttribute) == 204) {
qCInfo(lcAccountState) << "Server is now available for account" << _account->id();
qCInfo(lcAccountState) << "Server is now available for account" << _account->davUser();
_lastCheckConnectionTimer.invalidate();
resetRetryCount();
QMetaObject::invokeMethod(this, "slotCheckConnection", Qt::QueuedConnection);
Expand Down

0 comments on commit 09c5c3e

Please sign in to comment.