File tree Expand file tree Collapse file tree 1 file changed +7
-13
lines changed
Expand file tree Collapse file tree 1 file changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -207,19 +207,13 @@ int ArduinoIoTCloudTCP::reconnect()
207207
208208int ArduinoIoTCloudTCP::connect ()
209209{
210- if (!_mqttClient->connect (_brokerAddress.c_str (), _brokerPort)) {
211- return CONNECT_FAILURE;
212- }
213- if (_mqttClient->subscribe (_stdinTopic) == 0 ) {
214- return CONNECT_FAILURE_SUBSCRIBE;
215- }
216- if (_mqttClient->subscribe (_dataTopicIn) == 0 ) {
217- return CONNECT_FAILURE_SUBSCRIBE;
218- }
219- if (_shadowTopicIn != " " ) {
220- if (_mqttClient->subscribe (_shadowTopicIn) == 0 ) {
221- return CONNECT_FAILURE_SUBSCRIBE;
222- }
210+ if (!_mqttClient->connect (_brokerAddress.c_str (), _brokerPort)) return CONNECT_FAILURE;
211+ if (_mqttClient->subscribe (_stdinTopic) == 0 ) return CONNECT_FAILURE_SUBSCRIBE;
212+ if (_mqttClient->subscribe (_dataTopicIn) == 0 ) return CONNECT_FAILURE_SUBSCRIBE;
213+
214+ if (_shadowTopicIn != " " )
215+ {
216+ if (_mqttClient->subscribe (_shadowTopicIn) == 0 ) return CONNECT_FAILURE_SUBSCRIBE;
223217 _syncStatus = ArduinoIoTSynchronizationStatus::SYNC_STATUS_WAIT_FOR_CLOUD_VALUES;
224218 _lastSyncRequestTickTime = 0 ;
225219 }
You can’t perform that action at this time.
0 commit comments