aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZandra <[email protected]>2016-04-04 09:23:15 +0200
committerZandra <[email protected]>2016-04-04 09:23:15 +0200
commitc9f63aa227432e5adfb1a6743887c6c8d47a60b3 (patch)
tree3873201ed928432b510d28a9b3b3659ed6daf327
parent2f0fa3806c9196f16bb49dc0ee3fbc4737eea23f (diff)
parentd6f07d89603bb19db38536239e1feec3dcdd4688 (diff)
downloadotp-c9f63aa227432e5adfb1a6743887c6c8d47a60b3.tar.gz
otp-c9f63aa227432e5adfb1a6743887c6c8d47a60b3.tar.bz2
otp-c9f63aa227432e5adfb1a6743887c6c8d47a60b3.zip
Merge branch 'dcorbacho/dist_util_logs'
OTP-13458 * dcorbacho/dist_util_logs: Keep error reasons for some common distribution errors
-rw-r--r--lib/kernel/src/dist_util.erl26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/kernel/src/dist_util.erl b/lib/kernel/src/dist_util.erl
index c9fc26d62c..e3817fcce5 100644
--- a/lib/kernel/src/dist_util.erl
+++ b/lib/kernel/src/dist_util.erl
@@ -196,7 +196,7 @@ check_dflag_xnc(#hs_data{other_node = Node,
error_msg("** ~w: Connection attempt ~s node ~w ~s "
"since it cannot handle extended ~s. "
"**~n", [node(), Dir, Node, How, What]),
- ?shutdown(Node)
+ ?shutdown2(Node, {check_dflag_xnc_failed, What})
end.
@@ -576,13 +576,13 @@ recv_challenge(#hs_data{socket=Socket,other_node=Node,
[Node, Challenge,Version]),
{Flags,Challenge};
_ ->
- ?shutdown(no_node)
+ ?shutdown2(no_node, {recv_challenge_failed, no_node, Ns})
catch
error:badarg ->
- ?shutdown(no_node)
+ ?shutdown2(no_node, {recv_challenge_failed, no_node, Ns})
end;
- _ ->
- ?shutdown(no_node)
+ Other ->
+ ?shutdown2(no_node, {recv_challenge_failed, Other})
end.
@@ -626,10 +626,10 @@ recv_challenge_ack(#hs_data{socket = Socket, f_recv = FRecv,
_ ->
error_msg("** Connection attempt to "
"disallowed node ~w ** ~n", [NodeB]),
- ?shutdown(NodeB)
+ ?shutdown2(NodeB, {recv_challenge_ack_failed, bad_cookie})
end;
- _ ->
- ?shutdown(NodeB)
+ Other ->
+ ?shutdown2(NodeB, {recv_challenge_ack_failed, Other})
end.
recv_status(#hs_data{kernel_pid = Kernel, socket = Socket,
@@ -639,7 +639,7 @@ recv_status(#hs_data{kernel_pid = Kernel, socket = Socket,
Stat = list_to_atom(StrStat),
?debug({dist_util,self(),recv_status, Node, Stat}),
case Stat of
- not_allowed -> ?shutdown(Node);
+ not_allowed -> ?shutdown2(Node, {recv_status_failed, not_allowed});
nok ->
%% wait to be killed by net_kernel
receive
@@ -656,10 +656,10 @@ recv_status(#hs_data{kernel_pid = Kernel, socket = Socket,
end;
_ -> Stat
end;
- _Error ->
+ Error ->
?debug({dist_util,self(),recv_status_error,
- Node, _Error}),
- ?shutdown(Node)
+ Node, Error}),
+ ?shutdown2(Node, {recv_status_failed, Error})
end.
@@ -758,7 +758,7 @@ setup_timer(Pid, Timeout) ->
setup_timer(Pid, Timeout)
after Timeout ->
?trace("Timer expires ~p, ~p~n",[Pid, Timeout]),
- ?shutdown(timer)
+ ?shutdown2(timer, setup_timer_timeout)
end.
reset_timer(Timer) ->