From 31aaa54d35405d7f10b6fa702baa2294ebbdcd6a Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Thu, 9 May 2019 18:36:58 +0200 Subject: [PATCH] Always try to connect to the cloud if it's enabled by settings. --- libnymea-core/cloud/cloudmanager.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libnymea-core/cloud/cloudmanager.cpp b/libnymea-core/cloud/cloudmanager.cpp index 4da48a77..8c4da276 100644 --- a/libnymea-core/cloud/cloudmanager.cpp +++ b/libnymea-core/cloud/cloudmanager.cpp @@ -115,15 +115,15 @@ void CloudManager::setEnabled(bool enabled) return; } - qCDebug(dcCloud()) << "Enabling cloud connection."; - if (!m_awsConnector->isConnected() && m_networkManager->state() == NetworkManager::NetworkManagerStateConnectedGlobal) { - connect2aws(); - } + qCDebug(dcCloud()) << "Cloud connection is now enabled. Trying to connect..."; + // FIXME: Ideally we'd check if the network is connected, however, on some platforms we have no reliable + // way to know that yet. Let's always try to connect for now. + connect2aws(); } else { - qCDebug(dcCloud()) << "Disabling cloud connection."; m_enabled = false; m_awsConnector->disconnectAWS(); emit connectionStateChanged(); + qCDebug(dcCloud()) << "Cloud connection is now disabled."; } }