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

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

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

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

Change-Id: I030d30ea736dc88d0f6219c5332945912ffa4f9a
parents 58f39f95 8e6afc05
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;