Skip to content

Commit 293f741

Browse files
committed
Clear error flag and transmit this clearing to the cloud before embarking on a new download
1 parent 6580a89 commit 293f741

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/ArduinoIoTCloudTCP.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,10 @@ ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_Connected()
307307
*/
308308
if (_ota_req)
309309
{
310+
/* Clear the error flag. */
311+
_ota_error = static_cast<int>(OTAError::None);
312+
/* Transmit the cleared error flag to the cloud. */
313+
sendPropertiesToCloud();
310314
/* Clear the request flag. */
311315
_ota_req = false;
312316
/* Call member function to handle OTA request. */

0 commit comments

Comments
 (0)