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

Commit abe0e755 authored by Yifan Hong's avatar Yifan Hong Committed by Automerger Merge Worker
Browse files

Merge "binder: Increase RPC backlog to 50." am: 8e6afc05 am: fc2d2d7d am:...

Merge "binder: Increase RPC backlog to 50." am: 8e6afc05 am: fc2d2d7d am: 83a5bb6e am: 90f27e2a

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1764907

Change-Id: I661f8d61f1f65e4119453319634348aef5671dd8
parents f9b3097e 90f27e2a
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -347,7 +347,11 @@ bool RpcServer::setupSocketServer(const RpcSocketAddress& addr) {
        return false;
    }

    if (0 != TEMP_FAILURE_RETRY(listen(serverFd.get(), 1 /*backlog*/))) {
    // Right now, we create all threads at once, making accept4 slow. To avoid hanging the client,
    // the backlog is increased to a large number.
    // TODO(b/189955605): Once we create threads dynamically & lazily, the backlog can be reduced
    //  to 1.
    if (0 != TEMP_FAILURE_RETRY(listen(serverFd.get(), 50 /*backlog*/))) {
        int savedErrno = errno;
        ALOGE("Could not listen socket at %s: %s", addr.toString().c_str(), strerror(savedErrno));
        return false;