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

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

Revert "lshal: close fd before joining thread"

This reverts commit b9d19c87.

Reason of revert: will sometimes cause `lshal debug` to produce
no output at all.

Bug: 111997867
Test: while true; do date; lshal debug android.hardware.health.storage@1.0::IStorage/default; done

Change-Id: I31062b479ea8a9f1c5b94a1ad0969bc5e2e92cd3
parent 85eaa63b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -77,12 +77,13 @@ void PipeRelay::CloseFd(int *fd) {

PipeRelay::~PipeRelay() {
    CloseFd(&mFds[1]);
    CloseFd(&mFds[0]);

    if (mThread != nullptr) {
        mThread->join();
        mThread.clear();
    }

    CloseFd(&mFds[0]);
}

status_t PipeRelay::initCheck() const {