Skip to content

Commit dd74df9

Browse files
committed
fix: ota_core: push version before push status change
1 parent ac5dcc5 commit dd74df9

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/otaclient/ota_core.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -856,19 +856,18 @@ def __init__(
856856
# load and report booted OTA status
857857
_boot_ctrl_loaded_ota_status = self.boot_controller.get_booted_ota_status()
858858
self._live_ota_status = _boot_ctrl_loaded_ota_status
859+
self.current_version = self.boot_controller.load_version()
859860
status_report_queue.put_nowait(
860861
StatusReport(
861-
payload=OTAStatusChangeReport(
862-
new_ota_status=_boot_ctrl_loaded_ota_status,
862+
payload=SetOTAClientMetaReport(
863+
firmware_version=self.current_version,
863864
),
864865
)
865866
)
866-
867-
self.current_version = self.boot_controller.load_version()
868867
status_report_queue.put_nowait(
869868
StatusReport(
870-
payload=SetOTAClientMetaReport(
871-
firmware_version=self.current_version,
869+
payload=OTAStatusChangeReport(
870+
new_ota_status=_boot_ctrl_loaded_ota_status,
872871
),
873872
)
874873
)

0 commit comments

Comments
 (0)