From 5eadaf69e394c030056e4190d86dae0262f8617c Mon Sep 17 00:00:00 2001 From: Maxim Dounin Date: Tue, 1 Jun 2021 17:37:51 +0300 Subject: Fixed SSL logging with lingering close. Recent fixes to SSL shutdown with lingering close (554c6ae25ffc, 1.19.5) broke logging of SSL variables. To make sure logging of SSL variables works properly, avoid freeing c->ssl when doing an SSL shutdown before lingering close. Reported by Reinis Rozitis (http://mailman.nginx.org/pipermail/nginx/2021-May/060670.html). --- src/http/ngx_http_request.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/http/ngx_http_request.c') diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index 81b27a386..0bb122ce0 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -3400,6 +3400,8 @@ ngx_http_set_lingering_close(ngx_connection_t *c) if (c->ssl) { ngx_int_t rc; + c->ssl->shutdown_without_free = 1; + rc = ngx_ssl_shutdown(c); if (rc == NGX_ERROR) { -- cgit v1.2.3