From ca46b31327072c88140e5434b29fa826fc3d47ad Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Thu, 7 Mar 2019 20:44:46 +0100 Subject: ssl: Correct active once emulation Conflicts: lib/ftp/test/ftp_SUITE.erl --- lib/ssl/src/ssl_connection.erl | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/ssl') diff --git a/lib/ssl/src/ssl_connection.erl b/lib/ssl/src/ssl_connection.erl index 24fb091ddf..ad81288f64 100644 --- a/lib/ssl/src/ssl_connection.erl +++ b/lib/ssl/src/ssl_connection.erl @@ -2691,6 +2691,11 @@ ssl_options_list([Key | Keys], [Value | Values], Acc) -> handle_active_option(false, connection = StateName, To, Reply, State) -> hibernate_after(StateName, State, [{reply, To, Reply}]); +handle_active_option(_, connection = StateName, To, _Reply, #state{connection_env = #connection_env{terminated = true}, + user_data_buffer = {_,0,_}} = State) -> + handle_normal_shutdown(?ALERT_REC(?FATAL, ?CLOSE_NOTIFY, all_data_deliverd), StateName, + State#state{start_or_recv_from = To}), + {stop,{shutdown, peer_close}, State}; handle_active_option(_, connection = StateName0, To, Reply, #state{static_env = #static_env{protocol_cb = Connection}, user_data_buffer = {_,0,_}} = State0) -> case Connection:next_event(StateName0, no_record, State0) of -- cgit v1.2.3