diff options
author | Raimo Niskanen <[email protected]> | 2018-12-03 14:26:43 +0100 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2018-12-04 10:14:57 +0100 |
commit | 5d2e52ff81558471499986386d6018cdb4e8ccc8 (patch) | |
tree | d2cecc83991c7e655fad82c2df63a750ec0e4bdb /lib/ssl | |
parent | b96f872bba8cbcd87d1e1f4a5caffdb362f45111 (diff) | |
download | otp-5d2e52ff81558471499986386d6018cdb4e8ccc8.tar.gz otp-5d2e52ff81558471499986386d6018cdb4e8ccc8.tar.bz2 otp-5d2e52ff81558471499986386d6018cdb4e8ccc8.zip |
Handle socket close in state downgrade
Diffstat (limited to 'lib/ssl')
-rw-r--r-- | lib/ssl/src/ssl_connection.erl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ssl/src/ssl_connection.erl b/lib/ssl/src/ssl_connection.erl index cd0a1d858d..9b16c3c9ed 100644 --- a/lib/ssl/src/ssl_connection.erl +++ b/lib/ssl/src/ssl_connection.erl @@ -1092,6 +1092,12 @@ downgrade(internal, #alert{description = ?CLOSE_NOTIFY}, downgrade(timeout, downgrade, #state{downgrade = {_, From}} = State, _) -> gen_statem:reply(From, {error, timeout}), stop(normal, State); +downgrade( + info, {CloseTag, Socket}, + #state{socket = Socket, close_tag = CloseTag, downgrade = {_, From}} = + State, _) -> + gen_statem:reply(From, {error, CloseTag}), + stop(normal, State); downgrade(Type, Event, State, Connection) -> handle_common_event(Type, Event, ?FUNCTION_NAME, State, Connection). |