diff options
author | Ingela Anderton Andin <[email protected]> | 2018-12-07 10:48:06 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2018-12-12 23:45:29 +0100 |
commit | 9fd877fd2eac46c9491266620ac942d212841259 (patch) | |
tree | ab9a7defa4d3ffd840bc64984a32b701961c2c07 /lib/ssl/src/dtls_connection.erl | |
parent | 8fc53b814e1c998caca0647ebec3b9f3471b6279 (diff) | |
download | otp-9fd877fd2eac46c9491266620ac942d212841259.tar.gz otp-9fd877fd2eac46c9491266620ac942d212841259.tar.bz2 otp-9fd877fd2eac46c9491266620ac942d212841259.zip |
ssl: Remove unnecessary internal event
Diffstat (limited to 'lib/ssl/src/dtls_connection.erl')
-rw-r--r-- | lib/ssl/src/dtls_connection.erl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/ssl/src/dtls_connection.erl b/lib/ssl/src/dtls_connection.erl index 25eb5488da..977de31de7 100644 --- a/lib/ssl/src/dtls_connection.erl +++ b/lib/ssl/src/dtls_connection.erl @@ -235,8 +235,15 @@ next_event(StateName, Record, end. %%% DTLS record protocol level application data messages -handle_protocol_record(#ssl_tls{type = ?APPLICATION_DATA, fragment = Data}, StateName, State) -> - {next_state, StateName, State, [{next_event, internal, {application_data, Data}}]}; + +handle_protocol_record(#ssl_tls{type = ?APPLICATION_DATA, fragment = Data}, StateName0, State0) -> + case ssl_connection:read_application_data(Data, State0) of + {stop, _, _} = Stop-> + Stop; + {Record, State1} -> + {next_state, StateName, State, Actions} = next_event(StateName0, Record, State1), + ssl_connection:hibernate_after(StateName, State, Actions) + end; %%% DTLS record protocol level handshake messages handle_protocol_record(#ssl_tls{type = ?HANDSHAKE, fragment = Data}, |