{
ap_run_suspend_connection(cs->c, cs->r);
cs->suspended = 1;
+ cs->c->sbh = NULL;
}
-static void notify_resume(event_conn_state_t *cs)
+static void notify_resume(event_conn_state_t *cs, ap_sb_handle_t *sbh)
{
+ cs->c->sbh = sbh;
cs->suspended = 0;
ap_run_resume_connection(cs->c, cs->r);
}
cs->pub.state = CONN_STATE_LINGER_NORMAL;
}
apr_atomic_inc32(&lingering_count);
- cs->c->sbh = NULL;
if (in_worker) {
notify_suspend(cs);
}
+ else {
+ cs->c->sbh = NULL;
+ }
apr_thread_mutex_lock(timeout_mutex);
TO_QUEUE_APPEND(*q, cs);
cs->pfd.reqevents = (
static int start_lingering_close_blocking(event_conn_state_t *cs)
{
if (ap_start_lingering_close(cs->c)) {
- cs->c->sbh = NULL;
notify_suspend(cs);
ap_push_pool(worker_queue_info, cs->p);
return 0;
event_conn_state_t *cs = dummy;
if (cs->suspended) {
- notify_resume(cs);
+ notify_resume(cs, NULL);
}
return APR_SUCCESS;
}
}
else {
c = cs->c;
- c->sbh = sbh;
- notify_resume(cs);
+ notify_resume(cs, sbh);
c->current_thread = thd;
/* Subsequent request on a conn, and thread number is part of ID */
c->id = conn_id;
* event thread poll for writeability.
*/
cs->expiration_time = ap_server_conf->timeout + apr_time_now();
- c->sbh = NULL;
notify_suspend(cs);
apr_thread_mutex_lock(timeout_mutex);
TO_QUEUE_APPEND(write_completion_q, cs);
*/
cs->expiration_time = ap_server_conf->keep_alive_timeout +
apr_time_now();
- c->sbh = NULL;
notify_suspend(cs);
apr_thread_mutex_lock(timeout_mutex);
TO_QUEUE_APPEND(keepalive_q, cs);
else if (cs->pub.state == CONN_STATE_SUSPENDED) {
cs->c->suspended_baton = cs;
apr_atomic_inc32(&suspended_count);
- c->sbh = NULL;
notify_suspend(cs);
}
}