Commit 576ce52
authored
minor: fix image upload cleanup refs (#3228)
A small bug the robot caught while looking at #3222.
At the end of a successful image upload, we delete the temporary
snapshot and disk. If snapshot deletion succeeded but disk deletion
failed, the catch path called `cleanup()` while `snapshot.current` still
pointed at the already-deleted snapshot. Cleanup would then try to
delete that snapshot again, fail with 404, and never reach the remaining
disk cleanup.
Fix: Clear each ref immediately after its successful delete so later
cleanup only retries resources that still exist.
It would be nice to have a test for this but it would be pretty
elaborate for little gain.1 parent 337b4e8 commit 576ce52
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
508 | 508 | | |
509 | 509 | | |
510 | 510 | | |
| 511 | + | |
511 | 512 | | |
| 513 | + | |
512 | 514 | | |
513 | 515 | | |
514 | 516 | | |
| |||
0 commit comments