fix IsCloudConnected call
which might return true even though we're not able to register the device
This commit is contained in:
parent
87280f8cae
commit
afcd034596
@ -201,7 +201,7 @@ void AWSConnector::disconnectAWS()
|
||||
|
||||
bool AWSConnector::isConnected() const
|
||||
{
|
||||
return m_connectingFuture.isFinished() && m_networkConnection && m_client && m_client->IsConnected();
|
||||
return m_connectingFuture.isFinished() && m_networkConnection && m_client && m_client->IsConnected() && !m_setupInProgress;
|
||||
}
|
||||
|
||||
void AWSConnector::setDeviceName(const QString &deviceName)
|
||||
@ -233,7 +233,7 @@ void AWSConnector::sendWebRtcHandshakeMessage(const QString &sessionId, const QV
|
||||
|
||||
quint16 AWSConnector::publish(const QString &topic, const QVariantMap &message)
|
||||
{
|
||||
if (!isConnected()) {
|
||||
if (!m_setupInProgress && !isConnected()) {
|
||||
qCWarning(dcAWS()) << "Can't publish to AWS: Not connected.";
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user