Skip to content

Commit 584650d

Browse files
Zainullin DamirZainullin Damir
authored andcommitted
++
1 parent 1281d57 commit 584650d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

include/ipfixprobe/outputPlugin/outputStorage/mq2OutputStorage.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class MQ2OutputStorage : public MQOutputStorage<ElementType> {
5252
const size_t tries
5353
= this->m_totalWritersCount / this->m_readerGroupSizes[readerGroupIndex] + 1;
5454
BackoffScheme backoff(3, std::numeric_limits<std::size_t>::max());
55-
for (const auto _ : std::views::iota(0U, std::numeric_limits<std::size_t>::max())) {
55+
while (true) {
5656
const uint8_t sequenceIndex = this->m_readersData[globalReaderIndex]->sequenceIndex++;
5757
const uint8_t queueIndex
5858
= this->m_readersData[globalReaderIndex]->queueJumpSequence
@@ -63,8 +63,10 @@ class MQ2OutputStorage : public MQOutputStorage<ElementType> {
6363
}
6464
// std::this_thread::yield();
6565
backoff.backoff();
66+
if (finished(readerGroupIndex)) {
67+
return nullptr;
68+
}
6669
}
67-
return nullptr;
6870
}
6971

7072
bool finished(const std::size_t readerGroupIndex) noexcept override

0 commit comments

Comments
 (0)