Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Commit

Permalink
Avoid flushing buffer when empty (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
rayw0ng authored Mar 15, 2020
1 parent 6a0cfe1 commit ed9cbe7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/InfluxDB.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void InfluxDB::batchOf(const std::size_t size)
}

void InfluxDB::flushBuffer() {
if (!mBuffering) {
if (!mBuffering || mBuffer.empty()) {
return;
}
std::string stringBuffer{};
Expand Down

0 comments on commit ed9cbe7

Please sign in to comment.