Skip to content

Commit 9cf7523

Browse files
committed
Handle _ota_req flag first to avoid running into minimum time between updates check and fail to update the cloud
1 parent c7945c6 commit 9cf7523

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: src/ArduinoIoTCloudTCP.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -499,11 +499,6 @@ ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_Connected()
499499
_mqtt_data_request_retransmit = false;
500500
}
501501

502-
/* Check if any properties need encoding and send them to
503-
* the cloud if necessary.
504-
*/
505-
sendPropertiesToCloud();
506-
507502
#if OTA_ENABLED
508503
/* Request a OTA download if the hidden property
509504
* OTA request has been set.
@@ -524,6 +519,11 @@ ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_Connected()
524519
}
525520
#endif /* OTA_ENABLED */
526521

522+
/* Check if any properties need encoding and send them to
523+
* the cloud if necessary.
524+
*/
525+
sendPropertiesToCloud();
526+
527527
return State::Connected;
528528
}
529529
}

0 commit comments

Comments
 (0)