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

Grab the context lock when draining the qhead


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88671 13f79535-47bb-0310-9956-ffa450edef68
parent 1002f321
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1079,7 +1079,7 @@ static void child_main()
    }

    /* Setting is_graceful will cause keep-alive connections to be closed
     * rather then block on the next network read.
     * rather than block on the next network read.
     */
    is_graceful = 1;

@@ -1129,11 +1129,13 @@ static void child_main()
            Sleep(1000);
        }
        /* Empty the accept queue of completion contexts */
        apr_lock_acquire(qlock);
        while (qhead) {
            CloseHandle(qhead->Overlapped.hEvent);
            closesocket(qhead->accept_socket);
            qhead = qhead->next;
        }
        apr_lock_release(qlock);
    }

    /* Give busy worker threads a chance to service their connections */