diff --git a/examples/ota-requestor-app/linux/main.cpp b/examples/ota-requestor-app/linux/main.cpp index 4aa4a96bb051c2..10c1c595d6aa67 100644 --- a/examples/ota-requestor-app/linux/main.cpp +++ b/examples/ota-requestor-app/linux/main.cpp @@ -126,11 +126,15 @@ void CustomOTARequestorDriver::UpdateDownloaded() { if (gAutoApplyImage) { - // Let the default driver take further action to apply the image + // Let the default driver take further action to apply the image. + // All member variables will be implicitly reset upon loading into the new image. DefaultOTARequestorDriver::UpdateDownloaded(); } else { + // Download complete but we're not going to apply image, so reset provider retry counter. + mProviderRetryCount = 0; + // Reset to put the state back to idle to allow the next OTA update to occur gRequestorCore.Reset(); } diff --git a/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp b/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp index f36bf5d1a96439..39aa512596305d 100644 --- a/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp +++ b/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp @@ -621,7 +621,6 @@ void DefaultOTARequestor::OnDownloadStateChanged(OTADownloader::State state, OTA { RecordErrorUpdateState(CHIP_ERROR_CONNECTION_ABORTED, reason); } - break; default: break;