Commit df4fbcf4 authored by Yann Ylavic's avatar Yann Ylavic
Browse files

event: Avoid possible blocking in the listener thread when shutting down

connections. PR 60956.

start_lingering_close_nonblocking() now puts connections in defer_linger_chain
which is emptied by any worker thread (all atomically) after its usual work,
hence the possibly blocking flush and lingering close run outside the listener.

The listener may create a dedicated worker it fills defer_linger_chain or while
it's not empty, calling push2worker with a NULL cs.

The state machine in process_socket() slighly modified to be able to enter with
CONN_STATE_LINGER directly w/o clogging_input_filters to possibly interfer.

New abort_socket_nonblocking() allows to reset connections when nonblocking is
required and we can't do much about the connection anymore, nor want the system
to linger on its own after close().

Many thanks to Stefan Priebe for it heavy testing on many event's changes!



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1802875 13f79535-47bb-0310-9956-ffa450edef68
parent fc6119c3
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment