Skip to content

Commit 694e128

Browse files
authored
Clear buffer in correct place (#249)
1 parent 175977c commit 694e128

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ endif()
1717

1818
# Define project
1919
project(Monitoring
20-
VERSION 3.8.4
20+
VERSION 3.8.5
2121
DESCRIPTION "O2 Monitoring library"
2222
LANGUAGES CXX
2323
)

src/Monitoring.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ void Monitoring::flushBuffer()
6363
for (auto& backend : mBackends) {
6464
if (matchVerbosity(backend->getVerbosity(), static_cast<Verbosity>(verbosity))) {
6565
backend->send(std::move(buffer));
66-
buffer.clear();
6766
}
6867
}
68+
buffer.clear();
6969
}
7070
}
7171

@@ -74,9 +74,9 @@ void Monitoring::flushBuffer(const short index)
7474
for (auto& backend : mBackends) {
7575
if (matchVerbosity(backend->getVerbosity(), static_cast<Verbosity>(index))) {
7676
backend->send(std::move(mStorage[index]));
77-
mStorage[index].clear();
7877
}
7978
}
79+
mStorage[index].clear();
8080
}
8181

8282
void Monitoring::enableProcessMonitoring(const unsigned int interval)

0 commit comments

Comments
 (0)