Restart discover timer to ensure recovery is attempted
The discovery timer was being deleted, so then it was not getting
resarted when a failure was detected.
This commit will disable (instead of delete) and then ensure the that
timer gets restarted while waiting for OCC status.
Verified on HW
Change-Id: Ibcb93d6d22f42b89282378d7b8904807b4150041
Signed-off-by: Chris Cain <cjcain@us.ibm.com>
diff --git a/occ_manager.cpp b/occ_manager.cpp
index 2ea0b5b..22150c2 100644
--- a/occ_manager.cpp
+++ b/occ_manager.cpp
@@ -206,7 +206,7 @@
// All sensors were found, disable the discovery timer
if (discoverTimer->isEnabled())
{
- discoverTimer.reset();
+ discoverTimer->setEnabled(false);
}
if (waitingForAllOccActiveSensors)
@@ -227,10 +227,7 @@
"checkAllActiveSensors(): Waiting for OCC Active sensors to become available");
tracedSensorWait = true;
}
- if (discoverTimer->isEnabled())
- {
- discoverTimer->restartOnce(10s);
- }
+ discoverTimer->restartOnce(10s);
}
}
#endif