mirror of
https://github.com/redis/redis.git
synced 2026-05-28 04:02:46 -04:00
TLS: Notify clients on connection shutdown. (#10931)
Use SSL_shutdown(), in a best-effort manner, when closing a TLS connection. This change better supports OpenSSL 3.x clients that will not silently ignore the socket-level EOF.
This commit is contained in:
parent
9bcdd1537e
commit
45ae605332
1 changed files with 2 additions and 0 deletions
|
|
@ -722,6 +722,8 @@ static void connTLSClose(connection *conn_) {
|
|||
tls_connection *conn = (tls_connection *) conn_;
|
||||
|
||||
if (conn->ssl) {
|
||||
if (conn->c.state == CONN_STATE_CONNECTED)
|
||||
SSL_shutdown(conn->ssl);
|
||||
SSL_free(conn->ssl);
|
||||
conn->ssl = NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue