Skip to content

Commit

Permalink
fix when transit events are reaching max
Browse files Browse the repository at this point in the history
  • Loading branch information
odygrd authored Mar 20, 2023
1 parent db5ad69 commit 6b671b2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions quill/include/quill/detail/backend/BackendWorker.h
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ void BackendWorker::_main_loop()
if (total_events >= _max_transit_events)
{
// process half transit events
for (size_t i = 0; i < static_cast<size_t>(_max_transit_events / 2); ++i)
for (size_t i = 0; i < total_events; ++i)
{
_process_transit_event(cached_thread_contexts);
}
Expand Down Expand Up @@ -742,7 +742,7 @@ void BackendWorker::_exit()
if (total_events >= _max_transit_events)
{
// process half transit events
for (size_t i = 0; i < static_cast<size_t>(_max_transit_events / 2); ++i)
for (size_t i = 0; i < total_events; ++i)
{
_process_transit_event(cached_thread_contexts);
}
Expand Down Expand Up @@ -792,4 +792,4 @@ void BackendWorker::_exit()
_rdtsc_clock.store(nullptr, std::memory_order_release);
delete rdtsc_clock;
}
} // namespace quill::detail
} // namespace quill::detail

0 comments on commit 6b671b2

Please sign in to comment.