aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2018-12-27 09:40:01 +0100
committerIngela Anderton Andin <[email protected]>2018-12-27 20:45:32 +0100
commit9188d8174bb7e8fa28058cb5d2835905c68321b8 (patch)
tree9ef0ccf5fa6dd63e672baf5945bcf559e58fd061 /lib/ssl/src
parent55bf32b64e1a4bbed588544077a109fc07e1f02d (diff)
downloadotp-9188d8174bb7e8fa28058cb5d2835905c68321b8.tar.gz
otp-9188d8174bb7e8fa28058cb5d2835905c68321b8.tar.bz2
otp-9188d8174bb7e8fa28058cb5d2835905c68321b8.zip
ssl: Gurantee active once data delivery
New internal active N changed timing, and new check is needed.
Diffstat (limited to 'lib/ssl/src')
-rw-r--r--lib/ssl/src/tls_connection.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ssl/src/tls_connection.erl b/lib/ssl/src/tls_connection.erl
index 9edf48fdef..8b24151d9f 100644
--- a/lib/ssl/src/tls_connection.erl
+++ b/lib/ssl/src/tls_connection.erl
@@ -893,6 +893,12 @@ handle_alerts([], Result) ->
Result;
handle_alerts(_, {stop, _, _} = Stop) ->
Stop;
+handle_alerts([#alert{level = ?WARNING, description = ?CLOSE_NOTIFY} | _Alerts],
+ {next_state, connection = StateName, #state{user_data_buffer = Buffer,
+ protocol_buffers = #protocol_buffers{tls_cipher_texts = CTs}} =
+ State}) when (Buffer =/= <<>>) orelse
+ (CTs =/= []) ->
+ {next_state, StateName, State#state{terminated = true}};
handle_alerts([Alert | Alerts], {next_state, StateName, State}) ->
handle_alerts(Alerts, ssl_connection:handle_alert(Alert, StateName, State));
handle_alerts([Alert | Alerts], {next_state, StateName, State, _Actions}) ->