aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2020-09-16 18:26:25 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2020-09-16 18:26:25 +0300
commite9a8612c13380beb7b313d3ce50b223abda3f90a (patch)
tree789a5674fbb5b8c3ede117db9e49958af45d1487 /src
parentf6c28f93aff7caad3c178d4989b73a6ed3281bcd (diff)
downloadnginx-e9a8612c13380beb7b313d3ce50b223abda3f90a.tar.gz
nginx-e9a8612c13380beb7b313d3ce50b223abda3f90a.zip
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 (limited to 'src')
-rw-r--r--src/event/ngx_event_openssl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/event/ngx_event_openssl.c b/src/event/ngx_event_openssl.c
index 16dc55382..da37b71df 100644
--- a/src/event/ngx_event_openssl.c
+++ b/src/event/ngx_event_openssl.c
@@ -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);