aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTom Briden <[email protected]>2015-04-14 09:21:57 +0100
committerTom Briden <[email protected]>2015-04-29 11:53:50 +0100
commitfc4336a56f3000316fb1d1bb2537f2b35aab0d16 (patch)
tree3323a2ff82c9d0796d5b4672f1c4c615e59bbb09 /lib
parentff1e0b2fe44a347670a5d72c45c061fefa6abc7f (diff)
downloadotp-fc4336a56f3000316fb1d1bb2537f2b35aab0d16.tar.gz
otp-fc4336a56f3000316fb1d1bb2537f2b35aab0d16.tar.bz2
otp-fc4336a56f3000316fb1d1bb2537f2b35aab0d16.zip
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
Diffstat (limited to 'lib')
-rw-r--r--lib/ssl/src/ssl_tls_dist_proxy.erl9
1 files changed, 7 insertions, 2 deletions
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) ->