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

Commit ef1fb488 authored by Neil Fuller's avatar Neil Fuller Committed by android-build-merger
Browse files

Merge "Fix receive timeout on LocalSocket" am: 7a9c0cd8

am: 680ec020

Change-Id: I9b5622a91cf459844ee3513191b45994d51c86a7
parents 61c0996d 680ec020
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -516,13 +516,11 @@ class LocalSocketImpl
                    Os.setsockoptLinger(fd, OsConstants.SOL_SOCKET, OsConstants.SO_LINGER, linger);
                    break;
                case SocketOptions.SO_TIMEOUT:
                    /*
                     * SO_TIMEOUT from the core library gets converted to
                     * SO_SNDTIMEO, but the option is supposed to set both
                     * send and receive timeouts. Note: The incoming timeout
                     * value is in milliseconds.
                     */
                    // The option must set both send and receive timeouts.
                    // Note: The incoming timeout value is in milliseconds.
                    StructTimeval timeval = StructTimeval.fromMillis(intValue);
                    Os.setsockoptTimeval(fd, OsConstants.SOL_SOCKET, OsConstants.SO_RCVTIMEO,
                            timeval);
                    Os.setsockoptTimeval(fd, OsConstants.SOL_SOCKET, OsConstants.SO_SNDTIMEO,
                            timeval);
                    break;