Fixed off by one bug in fluentd ingestor

This commit is contained in:
Lukas Joswiak 2021-07-30 18:19:24 -07:00
parent 3eed4084e2
commit 96baec8819
1 changed files with 2 additions and 2 deletions

View File

@ -95,9 +95,9 @@ class SampleSender : public std::enable_shared_from_this<SampleSender<Protocol,
unsigned size = 1; // 1 for fixmap identifier byte
auto waitState = to_string(iter->first);
if (waitState.size() < 32) {
size = waitState.size() + 1;
size += waitState.size() + 1;
} else {
size = waitState.size() + 2;
size += waitState.size() + 2;
}
size += iter->second.second;
// 2. allocate the buffer