I would like to propose some additions to event that help me get rid of two 
ugly hacks in mod_http2:

1. Initialization of slave connections
   event registers on pre_connection hook and checks if c is a slave 
(c->master) and if the connection state is either not there or the same as 
master (pointer copy). It then sets up a new cs using the slave connection pool.

2. Initialization of server config
   event keeps in its private connection state parts the server configuration 
(queues for timeouts and keepalives) that are unique to each server because of 
Timeout and KeepAliveTimeout settings. Normally, theses are set on 
post_read_request hooks which is fine and well. On master connections however, 
these hooks may never get called so the server config remains stuck on the 
connections base server.
   In the case of SNI however, we know which server this connection is intended 
for and should use its Timeouts. This is done by installing an early 
protocol_switch hook that sees connections updates and server_rec and 
initializes its connection state accordingly.

Please vote on the attached patch. I do not want to mess with event without 
having some moral backup...

-Stefan

Attachment: event_fix_slaves.patch
Description: Binary data

Reply via email to