[o2] Avoid a misleading console error output

This commit is contained in:
Nyall Dawson 2018-10-26 07:14:56 +10:00
parent 531f366372
commit 87f5c0c0d4

View File

@ -432,7 +432,6 @@ void O2::refresh() {
void O2::onRefreshFinished() {
QNetworkReply *refreshReply = qobject_cast<QNetworkReply *>(sender());
qDebug() << "O2::onRefreshFinished: Error" << (int)refreshReply->error() << refreshReply->errorString();
if (refreshReply->error() == QNetworkReply::NoError) {
QByteArray reply = refreshReply->readAll();
QVariantMap tokens = parseTokenResponse(reply);
@ -445,6 +444,10 @@ void O2::onRefreshFinished() {
Q_EMIT refreshFinished(QNetworkReply::NoError);
qDebug() << " New token expires in" << expires() << "seconds";
}
else
{
qDebug() << "O2::onRefreshFinished: Error" << (int)refreshReply->error() << refreshReply->errorString();
}
refreshReply->deleteLater();
}