Skip to content

Commit e2dcf92

Browse files
committed
Do not try to reconfigure device if connection is dropped
1 parent 1feb373 commit e2dcf92

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ArduinoIoTCloudTCP.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,8 @@ void ArduinoIoTCloudTCP::update()
334334

335335
if(getThingIdOutdatedFlag()) {
336336
DEBUG_VERBOSE("ArduinoIoTCloudTCP::%s Thing id outdated, reconfiguring...", __FUNCTION__);
337-
_state = State::CheckDeviceConfig;
337+
if (_mqttClient.connected())
338+
_state = State::CheckDeviceConfig;
338339
}
339340

340341
/* Run through the state machine. */

0 commit comments

Comments
 (0)