Skip to content

Commit bf01c01

Browse files
committed
Bugfix - directly transition to connected state if we don't need to perform any synchronisation due to no thing id being set
1 parent 6da1e21 commit bf01c01

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/ArduinoIoTCloudTCP.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,11 @@ ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_SubscribeMqttTopics()
268268

269269
DBG_VERBOSE("Connected to Arduino IoT Cloud");
270270
execCloudEventCallback(ArduinoIoTCloudEvent::CONNECT);
271-
return State::RequestLastValues;
271+
272+
if (_shadowTopicIn != "")
273+
return State::RequestLastValues;
274+
else
275+
return State::Connected;
272276
}
273277

274278
ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_RequestLastValues()

0 commit comments

Comments
 (0)