From b6d0e7224bdde50b6f5cdae8ac1051688c6913f5 Mon Sep 17 00:00:00 2001 From: zmstone Date: Mon, 21 Oct 2024 16:39:30 +0200 Subject: [PATCH] Do not trigger SSL CLIET ALERT when shutdown --- lib/ssl/src/ssl_gen_statem.erl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/ssl/src/ssl_gen_statem.erl b/lib/ssl/src/ssl_gen_statem.erl index eed0025ad7ce..03a815fa6f4a 100644 --- a/lib/ssl/src/ssl_gen_statem.erl +++ b/lib/ssl/src/ssl_gen_statem.erl @@ -1844,11 +1844,12 @@ log_alert(Level, Role, ProtocolName, StateName, Alert) -> statename => StateName, alert => Alert, alerter => peer}, Alert#alert.where). -terminate_alert(normal) -> - ?ALERT_REC(?WARNING, ?CLOSE_NOTIFY); -terminate_alert({Reason, _}) when Reason == close; - Reason == shutdown -> +terminate_alert(Reason) when Reason == normal; + Reason == shutdown; + Reason == close -> ?ALERT_REC(?WARNING, ?CLOSE_NOTIFY); +terminate_alert({Reason, _}) -> + terminate_alert(Reason); terminate_alert(_) -> ?ALERT_REC(?FATAL, ?INTERNAL_ERROR).