]> dgit.raspbian.org Git - nextcloud-desktop.git/commit
ConnectionValidator: properly handle error in status.php (#5188)
authorOlivier Goffart <olivier@woboq.com>
Tue, 20 Sep 2016 09:55:43 +0000 (11:55 +0200)
committerGitHub <noreply@github.com>
Tue, 20 Sep 2016 09:55:43 +0000 (11:55 +0200)
commitff701bd473242b417e8ef9b987d4593e1495020c
tree1a544749ecdaf04cb7c990edd448289c3b6ae267
parent31aaf956f5e60d430ab3bbfb57802b79dac902fe
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"
[...]
src/libsync/connectionvalidator.cpp