Skip to content

Commit d373405

Browse files
committed
Call DISCONNECT event when device is detached from a thing and print "Disconnected from Arduino IoT Cloud" on serial monitor
1 parent c9cd3f5 commit d373405

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/ArduinoIoTCloudTCP.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,8 @@ ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_CheckDeviceConfig()
487487
_mqttClient.unsubscribe(_shadowTopicIn);
488488
_mqttClient.unsubscribe(_dataTopicIn);
489489
_deviceSubscribedToThing = false;
490+
DEBUG_INFO("Disconnected from Arduino IoT Cloud");
491+
execCloudEventCallback(ArduinoIoTCloudEvent::DISCONNECT);
490492
}
491493

492494
updateThingTopics();

0 commit comments

Comments
 (0)