Skip to content

Commit

Permalink
[OTA] Reset instead of cancel when auto-apply is off (project-chip#16588
Browse files Browse the repository at this point in the history
)

- By the time UpdateDownloaded is called, the download has already completed and there is no need to cancel the download
- Reset will make sure the state is transitioned to idle
  • Loading branch information
carol-apple authored and andrei-menzopol committed Apr 14, 2022
1 parent 56a6440 commit 0b69f4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/ota-requestor-app/linux/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ void CustomOTARequestorDriver::UpdateDownloaded()
}
else
{
// Cancelling will put the state back to idle
gRequestorCore.CancelImageUpdate();
// Reset to put the state back to idle to allow the next OTA update to occur
gRequestorCore.Reset();
}
}

Expand Down

0 comments on commit 0b69f4f

Please sign in to comment.