Welcome! Log In Create A New Profile

Advanced

[nginx] SSL: disabled shutdown when there are buffered data.

Maxim Dounin
September 16, 2020 05:42PM
details: https://hg.nginx.org/nginx/rev/052ecc68d350
branches:
changeset: 7709:052ecc68d350
user: Maxim Dounin <mdounin@mdounin.ru>
date: Wed Sep 16 18:26:25 2020 +0300
description:
SSL: disabled shutdown when there are buffered data.

This fixes "SSL_shutdown() failed (SSL: ... bad write retry)" errors
as observed on the second SSL_shutdown() call after SSL shutdown fixes in
09fb2135a589 (1.19.2), notably when HTTP/2 connections are closed due
to read timeouts while there are incomplete writes.

diffstat:

src/event/ngx_event_openssl.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r f3c87533f92c -r 052ecc68d350 src/event/ngx_event_openssl.c
--- a/src/event/ngx_event_openssl.c Wed Sep 16 18:26:24 2020 +0300
+++ b/src/event/ngx_event_openssl.c Wed Sep 16 18:26:25 2020 +0300
@@ -2805,7 +2805,7 @@ ngx_ssl_shutdown(ngx_connection_t *c)
return NGX_OK;
}

- if (c->timedout || c->error) {
+ if (c->timedout || c->error || c->buffered) {
mode = SSL_RECEIVED_SHUTDOWN|SSL_SENT_SHUTDOWN;
SSL_set_quiet_shutdown(c->ssl->connection, 1);

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] SSL: disabled shutdown when there are buffered data.

Maxim Dounin 51 September 16, 2020 05:42PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 57
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready