File tree 2 files changed +15
-13
lines changed
2 files changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -437,17 +437,19 @@ void OccServer::runChecker()
437
437
}
438
438
}
439
439
440
- // execute periodic check, in any state
441
- int err = m_rco->iterateCheck ();
442
- // if there's an error but the SM hasn't been moved to t_State::error yet
443
- if (err && (m_rco->getState () != t_State::error)) {
444
- updateState (t_State::error);
445
-
446
- // the above publishes a state change event to the StateStream, but we also push an exception event on the
447
- // EventStream because the transition was initiated by the task
448
- auto taskErrorEvent = new pb::DeviceEvent;
449
- taskErrorEvent->set_type (pb::TASK_INTERNAL_ERROR);
450
- pushEvent (taskErrorEvent);
440
+ // execute periodic check, in any state except ERROR
441
+ if (m_rco->getState () != t_State::error) {
442
+ int err = m_rco->iterateCheck ();
443
+ // if there's an error but the SM hasn't been moved to t_State::error yet
444
+ if (err) {
445
+ updateState (t_State::error);
446
+
447
+ // the above publishes a state change event to the StateStream, but we also push an exception event on the
448
+ // EventStream because the transition was initiated by the task
449
+ auto taskErrorEvent = new pb::DeviceEvent;
450
+ taskErrorEvent->set_type (pb::TASK_INTERNAL_ERROR);
451
+ pushEvent (taskErrorEvent);
452
+ }
451
453
}
452
454
453
455
m_mu.unlock ();
Original file line number Diff line number Diff line change @@ -268,12 +268,12 @@ class OCC_EXPORT RuntimeControlledObject {
268
268
virtual int iterateRunning ();
269
269
270
270
/* *
271
- * Perform periodic checks during every state.
271
+ * Perform periodic checks during every state except ERROR .
272
272
*
273
273
* @return 0 if the check completed successfully and the machine can stay in the current state,
274
274
* or any other value to immediately trigger a transition to the error state.
275
275
*
276
- * This function is called continuously by OccServer::runChecker in any state, including
276
+ * This function is called continuously by OccServer::runChecker in any state except ERROR , including
277
277
* t_State::running. Its purpose is for the implementer to report an unusual condition in
278
278
* order to trigger a transition to t_State::error.
279
279
*/
You can’t perform that action at this time.
0 commit comments