diff options
author | Ingela Anderton Andin <[email protected]> | 2018-12-03 13:17:34 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2018-12-03 19:42:07 +0100 |
commit | 6558b668f630cda7bd3f4d81418b17843b5bbbf3 (patch) | |
tree | 09219f37d54428321c86dbe8ecab86286f0d7b43 /lib/ssl/src/tls_connection.erl | |
parent | 15aa90e8d852e27a6dc28c713aee66f57574705e (diff) | |
download | otp-6558b668f630cda7bd3f4d81418b17843b5bbbf3.tar.gz otp-6558b668f630cda7bd3f4d81418b17843b5bbbf3.tar.bz2 otp-6558b668f630cda7bd3f4d81418b17843b5bbbf3.zip |
ssl: Fix error handling in function passive_receive
Also avoid code duplication
Conflicts:
lib/ssl/src/dtls_connection.erl
lib/ssl/src/tls_connection.erl
Diffstat (limited to 'lib/ssl/src/tls_connection.erl')
-rw-r--r-- | lib/ssl/src/tls_connection.erl | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/ssl/src/tls_connection.erl b/lib/ssl/src/tls_connection.erl index 48f1206769..61cd0f3182 100644 --- a/lib/ssl/src/tls_connection.erl +++ b/lib/ssl/src/tls_connection.erl @@ -61,7 +61,7 @@ encode_alert/3, close/5, protocol_name/0]). %% Data handling --export([encode_data/3, passive_receive/2, +-export([encode_data/3, next_record/1, send/3, socket/5, setopts/3, getopts/3]). %% gen_statem state functions @@ -409,15 +409,6 @@ protocol_name() -> encode_data(Data, Version, ConnectionStates0)-> tls_record:encode_data(Data, Version, ConnectionStates0). -passive_receive(#state{user_data_buffer = Buffer} = State0, StateName) -> - case Buffer of - <<>> -> - next_event(StateName, no_record, State0); - _ -> - {Record, State} = ssl_connection:read_application_data(<<>>, State0), - next_event(StateName, Record, State) - end. - send(Transport, Socket, Data) -> tls_socket:send(Transport, Socket, Data). |