diff options
author | 2021-09-21 13:38:11 -0700 | |
---|---|---|
committer | 2021-09-21 23:41:11 +0000 | |
commit | b0ae543d43d2ef70ba6f7aafb5b2c7a6c065853a (patch) | |
tree | 28cf94800da3a2f504e707198a3997d7007547e7 | |
parent | aa677d973e4a609804f70f887fd2bb07bbcea67a (diff) |
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
-rw-r--r-- | cmds/lshal/PipeRelay.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cmds/lshal/PipeRelay.cpp b/cmds/lshal/PipeRelay.cpp index 0c3fb9663e..863490d314 100644 --- a/cmds/lshal/PipeRelay.cpp +++ b/cmds/lshal/PipeRelay.cpp @@ -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; |