Skip to content

Commit

Permalink
Revert "[Report Scheduler] Empty node pool handling (project-chip#31136
Browse files Browse the repository at this point in the history
…)"

This reverts commit bd24a65.
  • Loading branch information
mkardous-silabs committed Jan 9, 2024
1 parent 1b6a04a commit 0eb37b0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/app/reporting/SynchronizedReportSchedulerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,6 @@ void SynchronizedReportSchedulerImpl::TimerFired()
Timestamp now = mTimerDelegate->GetCurrentMonotonicTimestamp();
bool firedEarly = true;

// If there are no handlers registered, no need to do anything.
VerifyOrReturn(mNodesPool.Allocated());

mNodesPool.ForEachActiveObject([now, &firedEarly](ReadHandlerNode * node) {
if (node->GetMinTimestamp() <= now)
{
Expand All @@ -199,7 +196,8 @@ void SynchronizedReportSchedulerImpl::TimerFired()
return Loop::Continue;
});

if (firedEarly)
// If there are no handlers registers, no need to schedule the next report
if (mNodesPool.Allocated() && firedEarly)
{
// If we fired the timer early, we need to recalculate the next report timeout and reschedule the report
Timeout timeout = Milliseconds32(0);
Expand Down

0 comments on commit 0eb37b0

Please sign in to comment.