Corrected bug in TC, where delta sessions where being persisted upon failure during the commit operation

This commit is contained in:
Nav
2025-02-05 21:28:16 +00:00
parent 79d37cb550
commit 395f58ff32

View File

@@ -957,8 +957,9 @@ namespace TargetController
void TargetControllerComponent::disableProgrammingMode() {
if (this->deltaProgrammingSession.has_value()) {
this->commitDeltaProgrammingSession(*(this->deltaProgrammingSession));
const auto session = std::move(*(this->deltaProgrammingSession));
this->deltaProgrammingSession = std::nullopt;
this->commitDeltaProgrammingSession(session);
}
Logger::debug("Disabling programming mode");