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

Commit a19145fe authored by Rhed Jao's avatar Rhed Jao
Browse files

Dumpsys: stop writing when timed-out

Checks the time-left value and exits the loop when it's timed-out.

Bug: 173088913
Test: atest dump_test
Change-Id: I82a0c7fe919dc2eedce9f1f6b715e119c511b7c7
parent 84544748
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -427,7 +427,7 @@ status_t Dumpsys::writeDump(int fd, const String16& serviceName, std::chrono::mi
                 << strerror(errno) << std::endl;
            status = -errno;
            break;
        } else if (rc == 0) {
        } else if (rc == 0 || time_left_ms() == 0) {
            status = TIMED_OUT;
            break;
        }