View | Details | Raw Unified | Return to bug 61551
Collapse All | Expand All

(-)server/mpm/event/event.c (-6 / +16 lines)
Lines 1010-1017 static void process_socket(apr_thread_t *thd, apr_ Link Here
1010
         * otherwise write, should set the sense appropriately.
1010
         * otherwise write, should set the sense appropriately.
1011
         */
1011
         */
1012
        apr_atomic_inc32(&clogged_count);
1012
        apr_atomic_inc32(&clogged_count);
1013
        ap_run_process_connection(c);
1013
        rc = ap_run_process_connection(c);
1014
        if (cs->pub.state != CONN_STATE_SUSPENDED) {
1014
        if (rc || cs->pub.state != CONN_STATE_SUSPENDED) {
1015
            cs->pub.state = CONN_STATE_LINGER;
1015
            cs->pub.state = CONN_STATE_LINGER;
1016
        }
1016
        }
1017
        apr_atomic_dec32(&clogged_count);
1017
        apr_atomic_dec32(&clogged_count);
Lines 1018-1029 static void process_socket(apr_thread_t *thd, apr_ Link Here
1018
    }
1018
    }
1019
    else if (cs->pub.state == CONN_STATE_READ_REQUEST_LINE) {
1019
    else if (cs->pub.state == CONN_STATE_READ_REQUEST_LINE) {
1020
read_request:
1020
read_request:
1021
        ap_run_process_connection(c);
1021
        rc = ap_run_process_connection(c);
1022
1022
1023
        /* state will be updated upon return
1023
        /* State will be updated upon successful return: fall thru to either
1024
         * fall thru to either wait for readability/timeout or
1024
         * wait for readability/timeout, do write completion or lingering
1025
         * do lingering close
1025
         * close. But forcibly close the connection if the run failed (handler
1026
         * raised an error for it) or the state is something unexpected at the
1027
         * MPM level (meaning that no module handled it and we can't do much
1028
         * here; note that if a handler wants mpm_event to keep POLLIN for the
1029
         * rest of the request line it should use CHECK_REQUEST_LINE_READABLE
1030
         * and not simply return OK with the initial READ_REQUEST_LINE state).
1026
         */
1031
         */
1032
        if (rc || (cs->pub.state != CONN_STATE_CHECK_REQUEST_LINE_READABLE
1033
                   && cs->pub.state != CONN_STATE_WRITE_COMPLETION
1034
                   && cs->pub.state != CONN_STATE_SUSPENDED)) {
1035
            cs->pub.state = CONN_STATE_LINGER;
1036
        }
1027
    }
1037
    }
1028
1038
1029
    if (cs->pub.state == CONN_STATE_WRITE_COMPLETION) {
1039
    if (cs->pub.state == CONN_STATE_WRITE_COMPLETION) {

Return to bug 61551