diff options
author | Raimo Niskanen <[email protected]> | 2017-11-29 11:20:17 +0100 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2017-12-04 13:56:30 +0100 |
commit | e6be253c9968f71038347b25a157c1c01080e95f (patch) | |
tree | 59f745bb4efc222c8ab7cb09edcfe6f951cc61cd /lib/ssl/src/tls_connection.erl | |
parent | 057155088f14e111791489a50d25de67065b16ba (diff) | |
download | otp-e6be253c9968f71038347b25a157c1c01080e95f.tar.gz otp-e6be253c9968f71038347b25a157c1c01080e95f.tar.bz2 otp-e6be253c9968f71038347b25a157c1c01080e95f.zip |
Polish SSL distribution
Diffstat (limited to 'lib/ssl/src/tls_connection.erl')
-rw-r--r-- | lib/ssl/src/tls_connection.erl | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/ssl/src/tls_connection.erl b/lib/ssl/src/tls_connection.erl index 50284d19af..ddc3d4f61f 100644 --- a/lib/ssl/src/tls_connection.erl +++ b/lib/ssl/src/tls_connection.erl @@ -440,7 +440,8 @@ init(Type, Event, State) -> %%-------------------------------------------------------------------- error({call, From}, {start, _Timeout}, {Error, State}) -> - {stop_and_reply, normal, {reply, From, {error, Error}}, State}; + ssl_connection:stop_and_reply( + normal, {reply, From, {error, Error}}, State); error({call, _} = Call, Msg, State) -> gen_handshake(?FUNCTION_NAME, Call, Msg, State); error(_, _, _) -> @@ -662,7 +663,7 @@ handle_info({Protocol, _, Data}, StateName, next_event(StateName, Record, State); #alert{} = Alert -> ssl_connection:handle_normal_shutdown(Alert, StateName, State0), - {stop, {shutdown, own_alert}} + ssl_connection:stop({shutdown, own_alert}, State0) end; handle_info({CloseTag, Socket}, StateName, #state{socket = Socket, close_tag = CloseTag, @@ -689,7 +690,7 @@ handle_info({CloseTag, Socket}, StateName, end, ssl_connection:handle_normal_shutdown(?ALERT_REC(?FATAL, ?CLOSE_NOTIFY), StateName, State), - {stop, {shutdown, transport_closed}}; + ssl_connection:stop({shutdown, transport_closed}, State); true -> %% Fixes non-delivery of final TLS record in {active, once}. %% Basically allows the application the opportunity to set {active, once} again @@ -701,7 +702,7 @@ handle_info(Msg, StateName, State) -> handle_alerts([], Result) -> Result; -handle_alerts(_, {stop,_} = Stop) -> +handle_alerts(_, {stop, _, _} = Stop) -> Stop; handle_alerts([Alert | Alerts], {next_state, StateName, State}) -> handle_alerts(Alerts, ssl_connection:handle_alert(Alert, StateName, State)); |