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

Commit 62df6333 authored by Steven Moreland's avatar Steven Moreland Committed by Android (Google) Code Review
Browse files

Merge "RPC Binder: bootstrap clients non-blocking" into main

parents 3a622119 35a88e97
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -657,6 +657,8 @@ unique_fd RpcServer::releaseServer() {

status_t RpcServer::setupExternalServer(
        unique_fd serverFd, std::function<status_t(const RpcServer&, RpcTransportFd*)>&& acceptFn) {
    if (status_t res = binder::os::setNonBlocking(serverFd); res != OK) return res;

    RpcMutexLockGuard _l(mLock);
    if (mServer.fd.ok()) {
        ALOGE("Each RpcServer can only have one server.");
+2 −0
Original line number Diff line number Diff line
@@ -142,6 +142,8 @@ status_t RpcSession::setupUnixDomainClient(const char* path) {
}

status_t RpcSession::setupUnixDomainSocketBootstrapClient(unique_fd bootstrapFd) {
    if (status_t res = binder::os::setNonBlocking(bootstrapFd); res != OK) return res;

    mBootstrapTransport =
            mCtx->newTransport(RpcTransportFd(std::move(bootstrapFd)), mShutdownTrigger.get());
    return setupClient([&](const std::vector<uint8_t>& sessionId, bool incoming) {