Commit a271b8ba authored by Bill Stoddard's avatar Bill Stoddard
Browse files

Windows MPM: Handle ap_new_connection() failure.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88148 13f79535-47bb-0310-9956-ffa450edef68
parent d4e7fb15
Loading
Loading
Loading
Loading
+10 −7
Original line number Diff line number Diff line
@@ -1164,16 +1164,19 @@ static void worker_main(int thread_num)

        c = ap_new_connection(context->ptrans, server_conf, context->sock,
                              thread_num);

        if (c) {
            ap_process_connection(c);


            apr_getsocketopt(context->sock, APR_SO_DISCONNECTED, &disconnected);
            if (!disconnected) {
                context->accept_socket = INVALID_SOCKET;
                ap_lingering_close(c);
            }
        }
        else {
            /* ap_new_connection closes the socket on failure */
            context->accept_socket = INVALID_SOCKET;
        }
    }

    ap_update_child_status(0, thread_num, SERVER_DEAD, (request_rec *) NULL);