Skip to content

Commit e7fb5db

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

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
@@ -328,7 +328,8 @@ void ArduinoIoTCloudTCP::update()
328328

329329
if(getThingIdOutdatedFlag()) {
330330
DEBUG_VERBOSE("ArduinoIoTCloudTCP::%s Thing id outdated, reconfiguring...", __FUNCTION__);
331-
_state = State::CheckDeviceConfig;
331+
if (_mqttClient.connected())
332+
_state = State::CheckDeviceConfig;
332333
}
333334

334335
/* Run through the state machine. */

0 commit comments

Comments
 (0)