diff options
author | Ingela Andin <[email protected]> | 2019-01-08 10:32:33 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2019-01-08 10:32:33 +0100 |
commit | 36d0611e009a7792408534c122a65a2b8ebd23a7 (patch) | |
tree | e3931d6c44817c62c09b5bb083db0ae123bffef1 /lib/ssl/src | |
parent | eed24f53c0565a3dec351116ac9296cc64d89f2d (diff) | |
parent | 9188d8174bb7e8fa28058cb5d2835905c68321b8 (diff) | |
download | otp-36d0611e009a7792408534c122a65a2b8ebd23a7.tar.gz otp-36d0611e009a7792408534c122a65a2b8ebd23a7.tar.bz2 otp-36d0611e009a7792408534c122a65a2b8ebd23a7.zip |
Merge pull request #2076 from IngelaAndin/ingela/ssl/active-once/ERL-371
ssl: Guarantee active once data delivery
OTP-15504
Diffstat (limited to 'lib/ssl/src')
-rw-r--r-- | lib/ssl/src/tls_connection.erl | 6 |
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}) -> |