From 655d79d8e6117e0c0646f84d514d31044e791575 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Tue, 22 Nov 2016 17:00:20 +0100 Subject: [PATCH] fix reconnection --- server/cloud/cloudauthenticator.cpp | 4 +--- server/cloud/cloudconnection.cpp | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/server/cloud/cloudauthenticator.cpp b/server/cloud/cloudauthenticator.cpp index 71179738..e4014297 100644 --- a/server/cloud/cloudauthenticator.cpp +++ b/server/cloud/cloudauthenticator.cpp @@ -36,7 +36,6 @@ CloudAuthenticator::CloudAuthenticator(QString clientId, QString clientSecret, Q m_username = loadUserName(); m_networkManager = new QNetworkAccessManager(this); - m_networkManager-> connect(m_networkManager, &QNetworkAccessManager::finished, this, &CloudAuthenticator::replyFinished); connect(m_networkManager, &QNetworkAccessManager::sslErrors, this, &CloudAuthenticator::onSslErrors); @@ -305,8 +304,7 @@ void CloudAuthenticator::replyFinished(QNetworkReply *reply) m_timer->start((expireTime - 20) * 1000); } - if (!authenticated()) - setAuthenticated(true); + setAuthenticated(true); } diff --git a/server/cloud/cloudconnection.cpp b/server/cloud/cloudconnection.cpp index 16b23da0..f64eac6a 100644 --- a/server/cloud/cloudconnection.cpp +++ b/server/cloud/cloudconnection.cpp @@ -175,8 +175,6 @@ void CloudConnection::onError(const QAbstractSocket::SocketError &error) m_connection->close(); setConnected(false); m_error = Cloud::CloudErrorProxyServerNotReachable; - m_pingTimer->stop(); - m_reconnectionTimer->start(); } void CloudConnection::onPingTimeout()