comparison src/http/ngx_http_request.c @ 7696:45764bca69b0

SSL: disabled sending shutdown after ngx_http_test_reading(). Sending shutdown when ngx_http_test_reading() detects the connection is closed can result in "SSL_shutdown() failed (SSL: ... bad write retry)" critical log messages if there are blocked writes. Fix is to avoid sending shutdown via the c->ssl->no_send_shutdown flag, similarly to how it is done in ngx_http_keepalive_handler() for kqueue when pending EOF is detected. Reported by Jan Prachaƙ (http://mailman.nginx.org/pipermail/nginx-devel/2018-December/011702.html).
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 10 Aug 2020 18:52:34 +0300
parents 8253424d1aff
children eb940fe579cf 532fe796b0e2
comparison
equal deleted inserted replaced
7695:d57f15922ca3 7696:45764bca69b0
2990 2990
2991 if (err) { 2991 if (err) {
2992 rev->error = 1; 2992 rev->error = 1;
2993 } 2993 }
2994 2994
2995 #if (NGX_HTTP_SSL)
2996 if (c->ssl) {
2997 c->ssl->no_send_shutdown = 1;
2998 }
2999 #endif
3000
2995 ngx_log_error(NGX_LOG_INFO, c->log, err, 3001 ngx_log_error(NGX_LOG_INFO, c->log, err,
2996 "client prematurely closed connection"); 3002 "client prematurely closed connection");
2997 3003
2998 ngx_http_finalize_request(r, NGX_HTTP_CLIENT_CLOSED_REQUEST); 3004 ngx_http_finalize_request(r, NGX_HTTP_CLIENT_CLOSED_REQUEST);
2999 } 3005 }