Skip to content

Commit a498327

Browse files
committed
Do not try to reconfigure device if connection is dropped
1 parent 1339a1d commit a498327

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

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

339340
/* Run through the state machine. */

0 commit comments

Comments
 (0)