summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2023-04-23 09:00:07 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2023-05-03 23:11:35 -0400
commit01da9c088c9b64f0dca0b00dfd87ec3f9001f3f5 (patch)
treefd0c5f484280aa593d78febec174f9764432c2d1
parenta7b7010752066f0b24aec947e0870c2cea248a8d (diff)
downloadlighttpd-git-01da9c088c9b64f0dca0b00dfd87ec3f9001f3f5.tar.gz
[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
-rw-r--r--src/connections.c5
1 files changed, 5 insertions, 0 deletions
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) */