From ff6ca2a82c956807e28bb290efa70e791e1f8f8d Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Wed, 30 May 2018 18:46:05 +0300 Subject: Fixed keep-alive hanging after reconfiguration. --- src/nxt_http_request.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/nxt_http_request.c') diff --git a/src/nxt_http_request.c b/src/nxt_http_request.c index 9fc4a0e1..d1a30f0e 100644 --- a/src/nxt_http_request.c +++ b/src/nxt_http_request.c @@ -445,6 +445,7 @@ nxt_http_request_close_handler(nxt_task_t *task, void *obj, void *data) nxt_http_proto_t proto; nxt_http_request_t *r; nxt_http_proto_close_t handler; + nxt_socket_conf_joint_t *conf; nxt_router_access_log_t *access_log; r = obj; @@ -452,10 +453,12 @@ nxt_http_request_close_handler(nxt_task_t *task, void *obj, void *data) nxt_debug(task, "http request close handler"); + conf = r->conf; + if (!r->logged) { r->logged = 1; - access_log = r->socket_conf->router_conf->access_log; + access_log = conf->socket_conf->router_conf->access_log; if (access_log != NULL) { access_log->handler(task, r, access_log); @@ -468,7 +471,7 @@ nxt_http_request_close_handler(nxt_task_t *task, void *obj, void *data) nxt_mp_release(r->mem_pool); if (proto.any != NULL) { - handler(task, proto); + handler(task, proto, conf); } } -- cgit