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

(-)original/httpd-2.4.9/server/mpm/event/event.c (+21 lines)
Lines 1053-1058 Link Here
1053
        return;
1053
        return;
1054
    }
1054
    }
1055
    else if (cs->pub.state == CONN_STATE_SUSPENDED) {
1055
    else if (cs->pub.state == CONN_STATE_SUSPENDED) {
1056
        cs->c->suspended_baton = cs;
1056
        apr_atomic_inc32(&suspended_count);
1057
        apr_atomic_inc32(&suspended_count);
1057
    }
1058
    }
1058
    /*
1059
    /*
Lines 1065-1070 Link Here
1065
    return;
1066
    return;
1066
}
1067
}
1067
1068
1069
/* Put a SUSPENDED connection back into a queue. */
1070
void ap_resume_suspended (conn_rec* c) {
1071
    event_conn_state_t* cs = (event_conn_state_t*) c->suspended_baton;
1072
    if (cs == NULL) {
1073
      ap_log_cerror (APLOG_MARK, LOG_WARNING, 200, c, "ap_resume_suspended: suspended_baton is NULL");
1074
      return;
1075
    }
1076
    apr_atomic_dec32(&suspended_count);
1077
    c->suspended_baton = NULL;
1078
1079
    apr_thread_mutex_lock(timeout_mutex);
1080
    TO_QUEUE_APPEND(write_completion_q, cs);
1081
    cs->pfd.reqevents = (
1082
            cs->pub.sense == CONN_SENSE_WANT_READ ? APR_POLLIN :
1083
                    APR_POLLOUT) | APR_POLLHUP | APR_POLLERR;
1084
    cs->pub.sense = CONN_SENSE_DEFAULT;
1085
    apr_pollset_add(event_pollset, &cs->pfd);
1086
    apr_thread_mutex_unlock(timeout_mutex);
1087
}
1088
1068
/* conns_this_child has gone to zero or below.  See if the admin coded
1089
/* conns_this_child has gone to zero or below.  See if the admin coded
1069
   "MaxConnectionsPerChild 0", and keep going in that case.  Doing it this way
1090
   "MaxConnectionsPerChild 0", and keep going in that case.  Doing it this way
1070
   simplifies the hot path in worker_thread */
1091
   simplifies the hot path in worker_thread */
(-)original/httpd-2.4.9/include/httpd.h (+4 lines)
Lines 1157-1162 Link Here
1157
#if APR_HAS_THREADS
1157
#if APR_HAS_THREADS
1158
    apr_thread_t *current_thread;
1158
    apr_thread_t *current_thread;
1159
#endif
1159
#endif
1160
1161
    /** Contains information necessary to resume a SUSPENDED connection.
1162
     *  See `ap_resume_suspended`. */
1163
    void *suspended_baton;
1160
};
1164
};
1161
1165
1162
/**
1166
/**

Return to bug 56333