aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2013-02-06 16:08:08 +0100
committerFredrik Gustafsson <[email protected]>2013-02-06 16:08:08 +0100
commitf21d6280bd52b2c97f231f8b853daffc204790b8 (patch)
treed2d481243784a7f7d7a7f89d32ea327230a6fa9a /lib/kernel
parentf6df4f219171f33d5c4bc514d03ec0ad30c5c20b (diff)
parent0e328bd14f2bc0e05cfc1ce6c44f3692af58ea03 (diff)
downloadotp-f21d6280bd52b2c97f231f8b853daffc204790b8.tar.gz
otp-f21d6280bd52b2c97f231f8b853daffc204790b8.tar.bz2
otp-f21d6280bd52b2c97f231f8b853daffc204790b8.zip
Merge branch 'mh/duplicate_name_error_message/OTP-10797'
* mh/duplicate_name_error_message/OTP-10797: Slightly nicer error message when node start fails due to duplicate name
Diffstat (limited to 'lib/kernel')
-rw-r--r--lib/kernel/src/inet6_tcp_dist.erl8
-rw-r--r--lib/kernel/src/inet_tcp_dist.erl8
2 files changed, 12 insertions, 4 deletions
diff --git a/lib/kernel/src/inet6_tcp_dist.erl b/lib/kernel/src/inet6_tcp_dist.erl
index b9c4fa607c..2315a56582 100644
--- a/lib/kernel/src/inet6_tcp_dist.erl
+++ b/lib/kernel/src/inet6_tcp_dist.erl
@@ -71,8 +71,12 @@ listen(Name) ->
{ok, Socket} ->
TcpAddress = get_tcp_address(Socket),
{_,Port} = TcpAddress#net_address.address,
- {ok, Creation} = erl_epmd:register_node(Name, Port),
- {ok, {Socket, TcpAddress, Creation}};
+ case erl_epmd:register_node(Name, Port) of
+ {ok, Creation} ->
+ {ok, {Socket, TcpAddress, Creation}};
+ Error ->
+ Error
+ end;
Error ->
Error
end.
diff --git a/lib/kernel/src/inet_tcp_dist.erl b/lib/kernel/src/inet_tcp_dist.erl
index 7f935c2b36..70f3c87723 100644
--- a/lib/kernel/src/inet_tcp_dist.erl
+++ b/lib/kernel/src/inet_tcp_dist.erl
@@ -67,8 +67,12 @@ listen(Name) ->
{ok, Socket} ->
TcpAddress = get_tcp_address(Socket),
{_,Port} = TcpAddress#net_address.address,
- {ok, Creation} = erl_epmd:register_node(Name, Port),
- {ok, {Socket, TcpAddress, Creation}};
+ case erl_epmd:register_node(Name, Port) of
+ {ok, Creation} ->
+ {ok, {Socket, TcpAddress, Creation}};
+ Error ->
+ Error
+ end;
Error ->
Error
end.