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

Commit b0ae543d authored by Yifan Hong's avatar Yifan Hong
Browse files

lshal: exhaust pipe before closing.

If there is a pending close request on the pipe,
but there's still data in the pipe, exhaust it.

Test: com.google.android.power.pts.PowerTest#power2RockBottomCheckTest
Bug: 200623090

Change-Id: Iaaa4ba0c3af480671d7d63f9b2dbf682277a3430
parent aa677d97
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -82,6 +82,7 @@ void PipeRelay::thread(unique_fd rfd, unique_fd rfdTrigger, std::ostream* out,
                continue;
            }
            out->write(buffer, n);
            continue;
        }
        if (pfd[0].revents & POLLHUP) {
            break;