mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
ConnectionValidator: Make sure we intercept propfind error
If the PROPFIND return an invalid code (like 200) then we would not recieve the error signal and we would never sync again. Found while investigating https://github.com/owncloud/enterprise/issues/1068
This commit is contained in:
parent
c98bf174ed
commit
893e22691d
@ -173,7 +173,7 @@ void ConnectionValidator::checkAuthentication()
|
||||
job->setTimeout(timeoutToUseMsec);
|
||||
job->setProperties(QList<QByteArray>() << "getlastmodified");
|
||||
connect(job, SIGNAL(result(QVariantMap)), SLOT(slotAuthSuccess()));
|
||||
connect(job, SIGNAL(networkError(QNetworkReply*)), SLOT(slotAuthFailed(QNetworkReply*)));
|
||||
connect(job, SIGNAL(finishedWithError(QNetworkReply*)), SLOT(slotAuthFailed(QNetworkReply*)));
|
||||
job->start();
|
||||
}
|
||||
|
||||
|
||||
@ -558,7 +558,7 @@ bool PropfindJob::finished()
|
||||
} else {
|
||||
qDebug() << "PROPFIND request *not* successful, http result code is" << http_result_code
|
||||
<< (http_result_code == 302 ? reply()->header(QNetworkRequest::LocationHeader).toString() : QLatin1String(""));
|
||||
emit finishedWithError();
|
||||
emit finishedWithError(reply());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -118,7 +118,7 @@ public:
|
||||
|
||||
signals:
|
||||
void result(const QVariantMap &values);
|
||||
void finishedWithError();
|
||||
void finishedWithError(QNetworkReply *reply = 0);
|
||||
|
||||
private slots:
|
||||
virtual bool finished() Q_DECL_OVERRIDE;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user