Skip to content

Commit

Permalink
Merge pull request chenshuo#266 from Coder-bin/cpp11
Browse files Browse the repository at this point in the history
fix AsyncLogging::threadFunc bug
  • Loading branch information
chenshuo authored Apr 4, 2017
2 parents 7eefb4f + a5dab4b commit bf260ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions muduo/base/AsyncLogging.cc
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,15 @@ void AsyncLogging::threadFunc()
{
assert(!buffersToWrite.empty());
newBuffer1 = std::move(buffersToWrite.back());
buffersToWrite.back();
buffersToWrite.pop_back();
newBuffer1->reset();
}

if (!newBuffer2)
{
assert(!buffersToWrite.empty());
newBuffer2 = std::move(buffersToWrite.back());
buffersToWrite.back();
buffersToWrite.pop_back();
newBuffer2->reset();
}

Expand Down

0 comments on commit bf260ae

Please sign in to comment.