def process_request_thread(self, request: Union[socket.socket, Tuple[bytes, socket.socket]],
                               client_address: Tuple[str, int]) -> None:
        """Process a request to the REST API.

        Wrapper for :func:`~socketserver.ThreadingMixIn.process_request_thread` that additionally:

            * Enable TCP keepalive
            * Perform SSL handshake (if an SSL socket).

        :param request: socket to handle the client request.
        :param client_address: tuple containing the client IP and port.
        """
        if isinstance(request, socket.socket):
            enable_keepalive(request, 10, 3)
        if hasattr(request, 'context'):  # SSLSocket
            from ssl import SSLSocket
            if isinstance(request, SSLSocket):  # pyright
                request.do_handshake()
        super(RestApiServer, self).process_request_thread(request, client_address)
Process a request to the REST API.

        Wrapper for :func:`~socketserver.ThreadingMixIn.process_request_thread` that additionally:

            * Enable TCP keepalive
            * Perform SSL handshake (if an SSL socket).

        :param request: socket to handle the client request.
        :param client_address: tuple containing the client IP and port.
        
patroni/api.py