From e1b955b6681be1b20d2bdc597f80e57e7901ba18 Mon Sep 17 00:00:00 2001 From: "Zachary J. Fields" Date: Tue, 2 Jul 2024 09:06:00 -0500 Subject: [PATCH] fix: infinite disconnect loop --- src/ArduinoIoTCloudTCP.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ArduinoIoTCloudTCP.cpp b/src/ArduinoIoTCloudTCP.cpp index f2a1b6fc..0671147d 100644 --- a/src/ArduinoIoTCloudTCP.cpp +++ b/src/ArduinoIoTCloudTCP.cpp @@ -346,9 +346,14 @@ ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_Disconnect() _mqttClient.stop(); } + // Reset the Thing property container Message message = { ResetCmdId }; _thing.handleMessage(&message); + _thing.update(); + + // Reset the Device property container _device.handleMessage(&message); + _device.update(); DEBUG_INFO("Disconnected from Arduino IoT Cloud"); execCloudEventCallback(ArduinoIoTCloudEvent::DISCONNECT);