From fc4336a56f3000316fb1d1bb2537f2b35aab0d16 Mon Sep 17 00:00:00 2001 From: Tom Briden Date: Tue, 14 Apr 2015 09:21:57 +0100 Subject: TLS Dist: Handle ssl_error and close ssl socket In some instances, restarting a node causes a fatal SSL error on the other nodes which isn't handled leaving the socket open. Eventually the nodes will net tick timeout but the node being restarted never comes back to life By handling the fatal error and closing the socket, the restarting node can restart successfully even when the ssl error occurs --- lib/ssl/src/ssl_tls_dist_proxy.erl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/ssl/src/ssl_tls_dist_proxy.erl b/lib/ssl/src/ssl_tls_dist_proxy.erl index a22af6b960..d23b42ace5 100644 --- a/lib/ssl/src/ssl_tls_dist_proxy.erl +++ b/lib/ssl/src/ssl_tls_dist_proxy.erl @@ -227,7 +227,10 @@ loop_conn_setup(World, Erts) -> {tcp_closed, Erts} -> ssl:close(World); {ssl_closed, World} -> - gen_tcp:close(Erts) + gen_tcp:close(Erts); + {ssl_error, World, _} -> + + ssl:close(World) end. loop_conn(World, Erts) -> @@ -241,7 +244,9 @@ loop_conn(World, Erts) -> {tcp_closed, Erts} -> ssl:close(World); {ssl_closed, World} -> - gen_tcp:close(Erts) + gen_tcp:close(Erts); + {ssl_error, World, _} -> + ssl:close(World) end. get_ssl_options(Type) -> -- cgit v1.2.3