From 01da9c088c9b64f0dca0b00dfd87ec3f9001f3f5 Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Sun, 23 Apr 2023 09:00:07 -0400 Subject: [core] noinline connection shutdown, reset slightly reduces code size for less-hot code better collects shutdown process for r->http_version > HTTP_VERSION_1_1 --- src/connections.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/connections.c b/src/connections.c index ac0cefc1..7c849bf1 100644 --- a/src/connections.c +++ b/src/connections.c @@ -37,6 +37,7 @@ __attribute_cold__ static connection *connection_init(server *srv); +__attribute_noinline__ static void connection_reset(connection *con); static connection *connections_get_new_connection(server *srv) { @@ -186,6 +187,10 @@ static void connection_handle_response_end_state(request_st * const r, connectio /* set a status so that mod_accesslog, mod_rrdtool hooks are called * in plugins_call_handle_request_done() (XXX: or set to 0 to omit) */ r->http_status = 100; /* XXX: what if con->state == CON_STATE_ERROR? */ + /*if (r->http_status)*/ + plugins_call_handle_request_done(r); + connection_handle_shutdown(con); + return; } /* call request_done hook if http_status set (e.g. to log request) */ -- cgit v1.2.1