aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/tls_connection.erl
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2018-12-04 13:49:29 +0100
committerRaimo Niskanen <[email protected]>2018-12-04 14:36:03 +0100
commit09b620eae7ebb623d7e62cbcab28c06e65d90008 (patch)
tree8a3821ad4e51c66a6d6b14503f1e52856bdeef30 /lib/ssl/src/tls_connection.erl
parent27e2677c08252b427690698e40c22c459bbaa83c (diff)
parentf37c8b37f49034fe10898ea47ed9c043ad2ba173 (diff)
downloadotp-09b620eae7ebb623d7e62cbcab28c06e65d90008.tar.gz
otp-09b620eae7ebb623d7e62cbcab28c06e65d90008.tar.bz2
otp-09b620eae7ebb623d7e62cbcab28c06e65d90008.zip
Merge branch 'maint'
Conflicts: lib/ssl/test/ssl_dist_bench_SUITE.erl
Diffstat (limited to 'lib/ssl/src/tls_connection.erl')
-rw-r--r--lib/ssl/src/tls_connection.erl18
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/ssl/src/tls_connection.erl b/lib/ssl/src/tls_connection.erl
index 296a68e8f3..ae784380c8 100644
--- a/lib/ssl/src/tls_connection.erl
+++ b/lib/ssl/src/tls_connection.erl
@@ -406,13 +406,11 @@ send_alert_in_connection(#alert{description = ?CLOSE_NOTIFY} = Alert, State) ->
send_alert_in_connection(Alert,
#state{protocol_specific = #{sender := Sender}}) ->
tls_sender:send_alert(Sender, Alert).
-send_sync_alert(Alert, #state{protocol_specific = #{sender := Sender}}= State) ->
- tls_sender:send_and_ack_alert(Sender, Alert),
- receive
- {Sender, ack_alert} ->
- ok
- after ?DEFAULT_TIMEOUT ->
- %% Sender is blocked terminate anyway
+send_sync_alert(
+ Alert, #state{protocol_specific = #{sender := Sender}} = State) ->
+ try tls_sender:send_and_ack_alert(Sender, Alert)
+ catch
+ _:_ ->
throw({stop, {shutdown, own_alert}, State})
end.
@@ -808,6 +806,12 @@ wait_sh(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).