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

Commit 77ddf62e authored by Andrei Homescu's avatar Andrei Homescu
Browse files

libbinder: clear RpcSession::mStartedSetup in case of error

Clear the mStartedSetup flag in case of error return from
RpcSession::setupClient and its callees so that the setup
can be retried and/or the RpcSession reused.

Bug: 242473043
Test: m
Change-Id: I4fa99ab9eb136756ee7344c73f2b3f57a7412e3f
parent b503c1a5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -484,6 +484,9 @@ status_t RpcSession::setupClient(const std::function<status_t(const std::vector<
        mProtocolVersion = oldProtocolVersion;

        mConnections = {};

        // clear mStartedSetup so that we can reuse this RpcSession
        mStartedSetup = false;
    });

    if (status_t status = connectAndInit({}, false /*incoming*/); status != OK) return status;