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

Commit e2d30d14 authored by Tom Cherry's avatar Tom Cherry
Browse files

logd: clear timeout if no start time is given

This code was accidentally deleted in the refactoring of
4f22786c cause the
logd.timeout_no_start test to start failing.

Bug: 117942520
Test: logd unit tests
Change-Id: Id7994230a89d7f8c2cb1f36a8ca1175a6b398de0
parent 30fa1b78
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -212,6 +212,10 @@ bool LogReader::onDataAvailable(SocketClient* cli) {
        cli->getUid(), cli->getGid(), cli->getPid(), nonBlock ? 'n' : 'b', tail,
        logMask, (int)pid, sequence.nsec(), timeout);

    if (sequence == log_time::EPOCH) {
        timeout = 0;
    }

    LogTimeEntry::wrlock();
    auto entry = std::make_unique<LogTimeEntry>(
        *this, cli, nonBlock, tail, logMask, pid, sequence, timeout);