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

Commit 5ecb51bb authored by Alice Wang's avatar Alice Wang
Browse files

binder-accessor: Improve resiliency to transient connection errors

Previously, a failure in `IAccessor::addConnection()` would propagate
up, causing the entire service lookup (`getService`) to fail
immediately. This could occur for transient reasons, such as the
remote service not being fully initialized, making the system less
resilient.

This cl updates the logic to specifically handle the
`ERROR_FAILED_TO_CONNECT_TO_SOCKET` error. Instead of propagating this
transient error, we now return a null service. This acts as a signal
for callers like `getService` to retry the lookup, making service
discovery more robust. Other, non-transient errors are still
propagated as before.

Flag: EXEMPT minor improvement in accessor
Bug: 432582317
Test: atest binderRpcTestSingleThreaded --host
Test: Launch Trusty on qemu with Security VM
Change-Id: I7b409a6dd402709f24fb3f246ad511ac1c35755f
parent 86d79afb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment