Merge r1802875 from trunk:
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 any possibly blocking flush and lingering close run outside the listener. The listener may create a dedicated worker if it fills defer_linger_chain or while it's not empty, calling push2worker with a NULL cs. The state machine in process_socket() is slighly modified to be able to enter with CONN_STATE_LINGER directly w/o clogging_input_filters to interfer. New abort_socket_nonblocking() allows to reset connections when nonblocking is required and we can't do much about the connection anymore, nor we want the system to linger on its own after close(). Many thanks to Stefan Priebe for his heavy testing on many event's changes! Submitted by: ylavic Reviewed by: ylavic, jim, icing git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1809299 13f79535-47bb-0310-9956-ffa450edef68
parent
affc5624
Please register or sign in to comment