aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/dtls_connection.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2019-02-11 18:23:04 +0100
committerIngela Anderton Andin <[email protected]>2019-02-13 11:10:58 +0100
commit8e83ba4791073274d58891c5ea0da53df1bd1cdb (patch)
treed6a954636e68f0fe748a227047976a065283808d /lib/ssl/src/dtls_connection.erl
parenteffb38acb2abddf3312262e8e8fa003613073b47 (diff)
downloadotp-8e83ba4791073274d58891c5ea0da53df1bd1cdb.tar.gz
otp-8e83ba4791073274d58891c5ea0da53df1bd1cdb.tar.bz2
otp-8e83ba4791073274d58891c5ea0da53df1bd1cdb.zip
ssl: Use gen_statem named timers to handle connection and recv timeouts
Diffstat (limited to 'lib/ssl/src/dtls_connection.erl')
-rw-r--r--lib/ssl/src/dtls_connection.erl6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/ssl/src/dtls_connection.erl b/lib/ssl/src/dtls_connection.erl
index 19c6008374..7a91578fe2 100644
--- a/lib/ssl/src/dtls_connection.erl
+++ b/lib/ssl/src/dtls_connection.erl
@@ -431,7 +431,6 @@ init({call, From}, {start, Timeout},
session = #session{own_certificate = Cert} = Session0,
connection_states = ConnectionStates0
} = State0) ->
- Timer = ssl_connection:start_or_recv_cancel_timer(Timeout, From),
Hello = dtls_handshake:client_hello(Host, Port, ConnectionStates0, SslOpts,
Cache, CacheCb, Renegotiation, Cert),
@@ -442,10 +441,9 @@ init({call, From}, {start, Timeout},
State3 = State2#state{connection_env = CEnv#connection_env{negotiated_version = Version}, %% RequestedVersion
session =
Session0#session{session_id = Hello#client_hello.session_id},
- start_or_recv_from = From,
- timer = Timer},
+ start_or_recv_from = From},
{Record, State} = next_record(State3),
- next_event(hello, Record, State, Actions);
+ next_event(hello, Record, State, [{{timeout, handshake}, Timeout, close} | Actions]);
init({call, _} = Type, Event, #state{static_env = #static_env{role = server},
protocol_specific = PS} = State) ->
Result = gen_handshake(?FUNCTION_NAME, Type, Event,