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

Commit 3b797e23 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "RPC Binder: -ECONNRESET => DEAD_OBJECT" into main

parents f989bb79 6147e4f0
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -394,6 +394,12 @@ static inline status_t handleRpcError(const std::unique_ptr<RpcTransport>& trans
              transport.get(), statusToString(status).c_str());
    }
    (void)session->shutdownAndWait(false);

    if (status == -ECONNRESET) {
        LOG_RPC_DETAIL("Converting -ECONNRESET to DEAD_OBJECT.");
        status = DEAD_OBJECT;
    }

    return status;
}

+1 −2
Original line number Diff line number Diff line
@@ -734,8 +734,7 @@ TEST_P(BinderRpc, SendTooLargeVector) {
    std::vector<uint8_t> result;
    status_t res = rootIface2->repeatBytes(kTestValue, &result).transactionError();

    // TODO(b/392717039): consistent error results always
    EXPECT_TRUE(res == -ECONNRESET || res == DEAD_OBJECT) << statusToString(res);
    EXPECT_EQ(res, DEAD_OBJECT) << statusToString(res);

    // died, so remove it for checks in destructor of proc
    proc.proc->sessions.erase(proc.proc->sessions.begin() + 1);