diff options
author | Zandra <[email protected]> | 2015-12-28 13:48:04 +0100 |
---|---|---|
committer | Zandra <[email protected]> | 2015-12-28 13:48:04 +0100 |
commit | dbd58427c1447af394ea5449cb4cdc32e446918b (patch) | |
tree | 5b92e3c8fbfc3bcbcb57dfb2279623b029bb0e24 /lib/ssl/src/ssl_tls_dist_proxy.erl | |
parent | 4f2d5c08a08e25e9b5b1b2011a8efe2fea441049 (diff) | |
parent | 91006821c6d65708fa05a93ec1edc2372326a3cb (diff) | |
download | otp-dbd58427c1447af394ea5449cb4cdc32e446918b.tar.gz otp-dbd58427c1447af394ea5449cb4cdc32e446918b.tar.bz2 otp-dbd58427c1447af394ea5449cb4cdc32e446918b.zip |
Merge branch 'legoscia/tls_dist_error_reporting' into maint
* legoscia/tls_dist_error_reporting:
Report bad options for outgoing TLS distribution
Save error reasons for TLS distribution connections
Report bad options for TLS distribution connections
OTP-13219
Diffstat (limited to 'lib/ssl/src/ssl_tls_dist_proxy.erl')
-rw-r--r-- | lib/ssl/src/ssl_tls_dist_proxy.erl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/ssl/src/ssl_tls_dist_proxy.erl b/lib/ssl/src/ssl_tls_dist_proxy.erl index d384264b53..3edd352891 100644 --- a/lib/ssl/src/ssl_tls_dist_proxy.erl +++ b/lib/ssl/src/ssl_tls_dist_proxy.erl @@ -204,6 +204,11 @@ accept_loop(Proxy, world = Type, Listen, Extra) -> end), ok = ssl:controlling_process(SslSocket, PairHandler), flush_old_controller(PairHandler, SslSocket); + {error, {options, _}} = Error -> + %% Bad options: that's probably our fault. Let's log that. + error_logger:error_msg("Cannot accept TLS distribution connection: ~s~n", + [ssl:format_error(Error)]), + gen_tcp:close(Socket); _ -> gen_tcp:close(Socket) end; @@ -235,6 +240,11 @@ setup_proxy(Ip, Port, Parent) -> Err -> Parent ! {self(), Err} end; + {error, {options, _}} = Err -> + %% Bad options: that's probably our fault. Let's log that. + error_logger:error_msg("Cannot open TLS distribution connection: ~s~n", + [ssl:format_error(Err)]), + Parent ! {self(), Err}; Err -> Parent ! {self(), Err} end. |