diff options
author | Raimo Niskanen <[email protected]> | 2018-11-28 09:31:05 +0100 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2018-11-30 15:07:17 +0100 |
commit | cadbaea28debb5fb761597afb7f3ff85367f2a0c (patch) | |
tree | eae291e6e562a92c2c2cf68de262f84964c9f7c9 | |
parent | 573220e4231bd6a7e4741dbd83848c2b03de048b (diff) | |
download | otp-cadbaea28debb5fb761597afb7f3ff85367f2a0c.tar.gz otp-cadbaea28debb5fb761597afb7f3ff85367f2a0c.tar.bz2 otp-cadbaea28debb5fb761597afb7f3ff85367f2a0c.zip |
Handle tls_sender exit properly
-rw-r--r-- | lib/ssl/src/ssl_connection.erl | 4 | ||||
-rw-r--r-- | lib/ssl/src/tls_connection.erl | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/ssl/src/ssl_connection.erl b/lib/ssl/src/ssl_connection.erl index acd9f14f7b..cd0a1d858d 100644 --- a/lib/ssl/src/ssl_connection.erl +++ b/lib/ssl/src/ssl_connection.erl @@ -51,8 +51,8 @@ %% Alert and close handling -export([handle_own_alert/4, handle_alert/3, - handle_normal_shutdown/3, stop/2, stop_and_reply/3 - ]). + handle_normal_shutdown/3, stop/2, stop_and_reply/3, + handle_trusted_certs_db/1]). %% Data handling -export([read_application_data/2, internal_renegotiation/2]). diff --git a/lib/ssl/src/tls_connection.erl b/lib/ssl/src/tls_connection.erl index 4dfb50967d..a4fc45e834 100644 --- a/lib/ssl/src/tls_connection.erl +++ b/lib/ssl/src/tls_connection.erl @@ -658,6 +658,12 @@ downgrade(Type, Event, State) -> callback_mode() -> state_functions. + +terminate( + {shutdown, sender_died, Reason}, _StateName, + #state{socket = Socket, transport_cb = Transport} = State) -> + ssl_connection:handle_trusted_certs_db(State), + close(Reason, Socket, Transport, undefined, undefined); terminate(Reason, StateName, State) -> catch ssl_connection:terminate(Reason, StateName, State), ensure_sender_terminate(Reason, State). |