aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMagnus Henoch <magnus@erlang-solutions.com>2015-10-28 17:15:36 +0000
committerMagnus Henoch <magnus.henoch@gmail.com>2015-12-10 15:24:52 +0000
commit5f49de9d6e8ae247b10e37c085bf1d1dc9945ac8 (patch)
tree25df35c12ae028e15628c7e74dde73d237016525 /lib
parentfcf198456fcd8e80c78b58c6616f7cf1266406cc (diff)
downloadotp-5f49de9d6e8ae247b10e37c085bf1d1dc9945ac8.tar.gz
otp-5f49de9d6e8ae247b10e37c085bf1d1dc9945ac8.tar.bz2
otp-5f49de9d6e8ae247b10e37c085bf1d1dc9945ac8.zip
Save error reasons for TLS distribution connections
When establishing an outbound connection for TLS distribution, let's hold on to the failure reasons and use them as exit reasons. These exit reasons are normally invisible, but they can be seen in the logs after calling net_kernel:verbose(1). While there are trace messages in the code already, those require recompiling the module with a special flag, which is more cumbersome than changing the net_kernel verbosity level at run time.
Diffstat (limited to 'lib')
-rw-r--r--lib/ssl/src/inet_tls_dist.erl12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/ssl/src/inet_tls_dist.erl b/lib/ssl/src/inet_tls_dist.erl
index 7367b5c224..411bb44bdc 100644
--- a/lib/ssl/src/inet_tls_dist.erl
+++ b/lib/ssl/src/inet_tls_dist.erl
@@ -75,23 +75,23 @@ do_setup(Kernel, Node, Type, MyNode, LongOrShortNames, SetupTime) ->
Timer, Version, Ip, TcpPort, Address,
Type),
dist_util:handshake_we_started(HSData);
- _ ->
+ Other ->
%% Other Node may have closed since
%% port_please !
?trace("other node (~p) "
"closed since port_please.~n",
[Node]),
- ?shutdown(Node)
+ ?shutdown2(Node, {shutdown, {connect_failed, Other}})
end;
- _ ->
+ Other ->
?trace("port_please (~p) "
"failed.~n", [Node]),
- ?shutdown(Node)
+ ?shutdown2(Node, {shutdown, {port_please_failed, Other}})
end;
- _Other ->
+ Other ->
?trace("inet_getaddr(~p) "
"failed (~p).~n", [Node,Other]),
- ?shutdown(Node)
+ ?shutdown2(Node, {shutdown, {inet_getaddr_failed, Other}})
end.
close(Socket) ->