ConnectionValidator: properly handle error in status.php (#5188)
authorOlivier Goffart <olivier@woboq.com>
Tue, 20 Sep 2016 09:55:43 +0000 (11:55 +0200)
committerOlivier Goffart <ogoffart@woboq.com>
Wed, 21 Sep 2016 12:30:36 +0000 (14:30 +0200)
commita810d69daa1174d13ab7594f9d6989a9596d2efe
tree94033f93c82923395f4c7b6142faa42a89d535ab
parent8496817db261c9776fd14452985b0d1fb4b89eaf
ConnectionValidator: properly handle error in status.php (#5188)

We wwer enot connecting to the right signal from the check server
job, and therefore we were not catching the condition in which the
json was invalid. We would then never terminate the ConnectionValidator job.

Note that instanceNotFound is also emited if there is a network error.

The log looked like this:

10:25:51.247 OCC::CheckServerJob::finished: status.php from server is not valid JSON!
10:25:51.248 OCC::CheckServerJob::finished: status.php returns:  QMap()   QNetworkReply::NetworkError(NoError)  Reply:  QNetworkReplyHttpImpl(0x2b6a790)
10:25:51.248 OCC::CheckServerJob::finished: No proper answer on  QUrl("http://localhost/~owncloud/status.php")
10:26:23.235 OCC::AccountState::checkConnectivity: ConnectionValidator already running, ignoring "owncloud@localhost"
10:26:55.235 OCC::AccountState::checkConnectivity: ConnectionValidator already running, ignoring "owncloud@localhost"
[...]
(cherry picked from commit ff701bd473242b417e8ef9b987d4593e1495020c)
src/libsync/connectionvalidator.cpp