Skip to content

Commit 0cdef77

Browse files
committed
Do not try to reconfigure device if connection is dropped
1 parent 718ddc7 commit 0cdef77

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ArduinoIoTCloudTCP.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,8 @@ void ArduinoIoTCloudTCP::update()
335335

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

341342
/* Run through the state machine. */

0 commit comments

Comments
 (0)