Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d653a67b authored by Andy Hung's avatar Andy Hung Committed by Android (Google) Code Review
Browse files

Merge "nblog: fix loop condition on getSnapshot" into main

parents 04c4364e db09e4b3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ std::unique_ptr<Snapshot> Reader::getSnapshot(bool flush)
    do {
        availToRead = mFifoReader->obtain(iovec, capacity, NULL /*timeout*/, &lostTemp);
        lost += lostTemp;
    } while (availToRead < 0 || ++tries <= kMaxObtainTries);
    } while (availToRead < 0 && ++tries <= kMaxObtainTries);

    if (availToRead <= 0) {
        ALOGW_IF(availToRead < 0, "NBLog Reader %s failed to catch up with Writer", mName.c_str());