aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2019-03-25 15:39:58 +0100
committerIngela Anderton Andin <[email protected]>2019-03-29 11:33:45 +0100
commit44c041847fa75d73f54fb5e45649db690126a3ee (patch)
treee2407627b54672ace9b889f68df11833c1f50f60
parent61e3f73986f70408909af0b5ec00dfc7ae2fc6de (diff)
downloadotp-44c041847fa75d73f54fb5e45649db690126a3ee.tar.gz
otp-44c041847fa75d73f54fb5e45649db690126a3ee.tar.bz2
otp-44c041847fa75d73f54fb5e45649db690126a3ee.zip
ssl: Adapt DTLS code to optimizations
-rw-r--r--lib/ssl/src/dtls_connection.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ssl/src/dtls_connection.erl b/lib/ssl/src/dtls_connection.erl
index 30b2ab7c4f..a6943af164 100644
--- a/lib/ssl/src/dtls_connection.erl
+++ b/lib/ssl/src/dtls_connection.erl
@@ -193,7 +193,8 @@ next_event(StateName, no_record,
%% TODO maybe buffer later epoch
next_event(StateName, no_record, State, Actions);
{#alert{} = Alert, State} ->
- {next_state, StateName, State, [{next_event, internal, Alert} | Actions]}
+ Version = State#state.connection_env#connection_env.negotiated_version,
+ handle_own_alert(Alert, Version, StateName, State)
end;
next_event(connection = StateName, Record,
#state{connection_states = #{current_read := #{epoch := CurrentEpoch}}} = State0, Actions) ->
@@ -233,7 +234,8 @@ next_event(StateName, Record,
%% TODO maybe buffer later epoch
next_event(StateName, no_record, State0, Actions);
#alert{} = Alert ->
- {next_state, StateName, State0, [{next_event, internal, Alert} | Actions]}
+ Version = State0#state.connection_env#connection_env.negotiated_version,
+ handle_own_alert(Alert, Version, StateName, State0)
end.
%%% DTLS record protocol level application data messages