From 6558b668f630cda7bd3f4d81418b17843b5bbbf3 Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Mon, 3 Dec 2018 13:17:34 +0100 Subject: 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 --- lib/ssl/src/tls_connection.erl | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'lib/ssl/src/tls_connection.erl') 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). -- cgit v1.2.3