Commit a032235
committed
Await download status report before resolving download()
Previously reportStatusDownload was fire-and-forget: download() resolved
as soon as the native download finished, without waiting for the
report_status/download HTTP call to complete. This let install() (and
a potential immediate-mode reload) run ahead of the report, so if the
app reloaded or was killed first, the download report was silently lost.
Now the report is awaited, with errors caught locally so a failed
report never blocks or breaks the install flow. This adds a small
delay to download() resolving, which is an acceptable tradeoff since
most installs are backgrounded, and even in immediate mode the wait
is dominated by the download itself.
Also adds a clarifying comment to reportStatusDeploy noting that
deployedPackage/status are null for the binary-update report case.1 parent c0079fe commit a032235
2 files changed
Lines changed: 24 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
4 | 21 | | |
5 | 22 | | |
6 | 23 | | |
| |||
31 | 48 | | |
32 | 49 | | |
33 | 50 | | |
34 | | - | |
35 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
36 | 54 | | |
37 | | - | |
| 55 | + | |
38 | 56 | | |
39 | 57 | | |
40 | 58 | | |
| |||
65 | 83 | | |
66 | 84 | | |
67 | 85 | | |
68 | | - | |
| 86 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
169 | 170 | | |
170 | 171 | | |
171 | 172 | | |
| |||
289 | 290 | | |
290 | 291 | | |
291 | 292 | | |
292 | | - | |
| 293 | + | |
0 commit comments