Remove duplicated code

Summary: Call Flush() function instead

Test Plan: make all check

Reviewers: igor

Reviewed By: igor

Subscribers: dhruba

Differential Revision: https://reviews.facebook.net/D38583
This commit is contained in:
stash93 2015-05-18 23:44:52 +03:00
parent fb5bdbf987
commit 0c8017dbae

View file

@ -146,9 +146,7 @@ class PosixLogger : public Logger {
uint64_t now_micros = static_cast<uint64_t>(now_tv.tv_sec) * 1000000 +
now_tv.tv_usec;
if (now_micros - last_flush_micros_ >= flush_every_seconds_ * 1000000) {
flush_pending_ = false;
fflush(file_);
last_flush_micros_ = now_micros;
Flush();
}
if (base != buffer) {
delete[] base;