Skip to content

Commit 00f61ba

Browse files
committed
Send cleared _ota_req to cloud to avoid recurring requests
1 parent bfe9e1c commit 00f61ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/ArduinoIoTCloudTCP.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -514,10 +514,10 @@ ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_Connected()
514514
if (_automatic_ota || (_get_ota_confirmation != nullptr && _get_ota_confirmation())) {
515515
/* Clear the error flag. */
516516
_ota_error = static_cast<int>(OTAError::None);
517-
/* Transmit the cleared error flag to the cloud. */
518-
sendPropertiesToCloud();
519517
/* Clear the request flag. */
520518
_ota_req = false;
519+
/* Transmit the cleared error and request flags to the cloud. */
520+
sendPropertiesToCloud();
521521
/* Call member function to handle OTA request. */
522522
onOTARequest();
523523
}

0 commit comments

Comments
 (0)