aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/ssl_connection.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ssl/src/ssl_connection.erl')
-rw-r--r--lib/ssl/src/ssl_connection.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ssl/src/ssl_connection.erl b/lib/ssl/src/ssl_connection.erl
index c1086a09ef..eb71bc61e9 100644
--- a/lib/ssl/src/ssl_connection.erl
+++ b/lib/ssl/src/ssl_connection.erl
@@ -2478,9 +2478,9 @@ handle_unrecv_data(StateName, #state{socket = Socket, transport_cb = Transport}
handle_close_alert(Data, StateName, State)
end.
-handle_close_alert(Data, StateName, State) ->
- case next_tls_record(Data, State) of
- #ssl_tls{type = ?ALERT, fragment = EncAlerts} ->
+handle_close_alert(Data, StateName, State0) ->
+ case next_tls_record(Data, State0) of
+ {#ssl_tls{type = ?ALERT, fragment = EncAlerts}, State} ->
[Alert|_] = decode_alerts(EncAlerts),
handle_normal_shutdown(Alert, StateName, State);
_ ->