Mercurial > hg > nginx-quic
comparison src/event/ngx_event_openssl.c @ 8112:052ecc68d350
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.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Wed, 16 Sep 2020 18:26:25 +0300 |
parents | f3c87533f92c |
children | 0875101c08f7 3bff3f397c05 |
comparison
equal
deleted
inserted
replaced
8111:f3c87533f92c | 8112:052ecc68d350 |
---|---|
2803 c->ssl = NULL; | 2803 c->ssl = NULL; |
2804 | 2804 |
2805 return NGX_OK; | 2805 return NGX_OK; |
2806 } | 2806 } |
2807 | 2807 |
2808 if (c->timedout || c->error) { | 2808 if (c->timedout || c->error || c->buffered) { |
2809 mode = SSL_RECEIVED_SHUTDOWN|SSL_SENT_SHUTDOWN; | 2809 mode = SSL_RECEIVED_SHUTDOWN|SSL_SENT_SHUTDOWN; |
2810 SSL_set_quiet_shutdown(c->ssl->connection, 1); | 2810 SSL_set_quiet_shutdown(c->ssl->connection, 1); |
2811 | 2811 |
2812 } else { | 2812 } else { |
2813 mode = SSL_get_shutdown(c->ssl->connection); | 2813 mode = SSL_get_shutdown(c->ssl->connection); |