aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2017-12-20 11:49:01 +0100
committerIngela Anderton Andin <[email protected]>2017-12-20 11:49:01 +0100
commit85f3051f40e731c530433eba2363c5c2a80b588e (patch)
tree301c47199950de45b5c32e480e34faa887206428 /lib
parentc0255143ff210b5643199061b1f4de4d7945f0e5 (diff)
parenta95cf9ac32606e4c92bd9254a9d29cd48f31a817 (diff)
downloadotp-85f3051f40e731c530433eba2363c5c2a80b588e.tar.gz
otp-85f3051f40e731c530433eba2363c5c2a80b588e.tar.bz2
otp-85f3051f40e731c530433eba2363c5c2a80b588e.zip
Merge branch 'ingela/DTLS/retransmission-timers' into maint
* ingela/DTLS/retransmission-timers: dtls: Use repeat_state to make sure retransmission timer is reset
Diffstat (limited to 'lib')
-rw-r--r--lib/ssl/src/dtls_connection.erl18
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/ssl/src/dtls_connection.erl b/lib/ssl/src/dtls_connection.erl
index 073cb4009b..55091c0219 100644
--- a/lib/ssl/src/dtls_connection.erl
+++ b/lib/ssl/src/dtls_connection.erl
@@ -218,12 +218,12 @@ next_event(StateName, Record,
#state{connection_states = #{current_read := #{epoch := CurrentEpoch}}} = State0, Actions) ->
case Record of
no_record ->
- {next_state, StateName, State0, Actions};
+ {next_state, StateName, State0, Actions};
#ssl_tls{epoch = CurrentEpoch,
version = Version} = Record ->
State = dtls_version(StateName, Version, State0),
- {next_state, StateName, State,
- [{next_event, internal, {protocol_record, Record}} | Actions]};
+ {next_state, StateName, State,
+ [{next_event, internal, {protocol_record, Record}} | Actions]};
#ssl_tls{epoch = _Epoch,
version = _Version} = _Record ->
%% TODO maybe buffer later epoch
@@ -863,12 +863,14 @@ handle_info(new_cookie_secret, StateName,
handle_info(Msg, StateName, State) ->
ssl_connection:StateName(info, Msg, State, ?MODULE).
-handle_state_timeout(flight_retransmission_timeout, StateName,
- #state{flight_state = {retransmit, NextTimeout}} = State0) ->
- {State1, Actions} = send_handshake_flight(State0#state{flight_state = {retransmit, NextTimeout}},
+handle_state_timeout(flight_retransmission_timeout, StateName,
+ #state{flight_state = {retransmit, NextTimeout}} = State0) ->
+ {State1, Actions0} = send_handshake_flight(State0#state{flight_state = {retransmit, NextTimeout}},
retransmit_epoch(StateName, State0)),
- {Record, State} = next_record(State1),
- next_event(StateName, Record, State, Actions).
+ {Record, State2} = next_record(State1),
+ {next_state, StateName, State, Actions} = next_event(StateName, Record, State2, Actions0),
+ %% This will reset the retransmission timer by repeating the enter state event
+ {repeat_state, State, Actions}.
handle_alerts([], Result) ->
Result;