Skip to content

Commit fc21f36

Browse files
committed
[occ] Only emit task internal error event once
1 parent 30ca2f5 commit fc21f36

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

occ/occlib/OccServer.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,10 @@ void OccServer::runChecker()
439439

440440
// execute periodic check, in any state
441441
int err = m_rco->iterateCheck();
442-
if (err) {
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)) {
443444
updateState(t_State::error);
445+
444446
// the above publishes a state change event to the StateStream, but we also push an exception event on the
445447
// EventStream because the transition was initiated by the task
446448
auto taskErrorEvent = new pb::DeviceEvent;

0 commit comments

Comments
 (0)