diff options
author | Zandra <[email protected]> | 2016-02-02 10:39:13 +0100 |
---|---|---|
committer | Zandra <[email protected]> | 2016-02-02 10:39:13 +0100 |
commit | 0f15f90ef5f482b0e860e41438151a5d9c4859e7 (patch) | |
tree | 2cb7eaf82c08f3713f94bb5e9183bf76c068907d /lib/ssl/src/ssl_tls_dist_proxy.erl | |
parent | 7ae14a1ad0ac38931d495453d627832c386cfa08 (diff) | |
parent | 81b63f2c3ffc9a1aee9e84de2e9875bf3acb6623 (diff) | |
download | otp-0f15f90ef5f482b0e860e41438151a5d9c4859e7.tar.gz otp-0f15f90ef5f482b0e860e41438151a5d9c4859e7.tar.bz2 otp-0f15f90ef5f482b0e860e41438151a5d9c4859e7.zip |
Merge branch 'legoscia/tls-dist-connect-options' into maint
* legoscia/tls-dist-connect-options:
ssl_dist_SUITE: don't use deprecated functions
TLS distribution: support inet_dist_connect_options
OTP-13285
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, 9 insertions, 1 deletions
diff --git a/lib/ssl/src/ssl_tls_dist_proxy.erl b/lib/ssl/src/ssl_tls_dist_proxy.erl index 080817d204..1e6c6e726a 100644 --- a/lib/ssl/src/ssl_tls_dist_proxy.erl +++ b/lib/ssl/src/ssl_tls_dist_proxy.erl @@ -89,6 +89,14 @@ listen_options(Opts0) -> Opts1 end. +connect_options(Opts) -> + case application:get_env(kernel, inet_dist_connect_options) of + {ok,ConnectOpts} -> + lists:ukeysort(1, ConnectOpts ++ Opts); + _ -> + Opts + end. + %%==================================================================== %% gen_server callbacks %%==================================================================== @@ -257,7 +265,7 @@ try_connect(Port) -> setup_proxy(Ip, Port, Parent) -> process_flag(trap_exit, true), - Opts = get_ssl_options(client), + Opts = connect_options(get_ssl_options(client)), case ssl:connect(Ip, Port, [{active, true}, binary, {packet,?PPRE}, nodelay()] ++ Opts) of {ok, World} -> {ok, ErtsL} = gen_tcp:listen(0, [{active, true}, {ip, {127,0,0,1}}, binary, {packet,?PPRE}]), |