diff options
-rw-r--r-- | src/rabbit_prelaunch.erl | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/src/rabbit_prelaunch.erl b/src/rabbit_prelaunch.erl index 0314cde5..a9c86e50 100644 --- a/src/rabbit_prelaunch.erl +++ b/src/rabbit_prelaunch.erl @@ -260,25 +260,21 @@ duplicate_node_check([]) -> %% Ignore running node while installing windows service ok; duplicate_node_check(Node) -> - case Node of - [] -> ok; - _ -> {NodeName, NodeHost} = rabbit_misc:nodeparts(Node), - case net_adm:names(NodeHost) of - {ok, NamePorts} -> - case proplists:is_defined(NodeName, NamePorts) of - true -> io:format("node with name ~p " - "already running on ~p~n", - [NodeName, NodeHost]), - [io:format(Fmt ++ "~n", Args) || - {Fmt, Args} <- - rabbit_control:diagnostics(Node)], - terminate(?ERROR_CODE); - false -> ok - end; - {error, address} -> ok; - {error, EpmdReason} -> terminate("unexpected epmd error:~p~n", - [EpmdReason]) - end + {NodeName, NodeHost} = rabbit_misc:nodeparts(Node), + case net_adm:names(NodeHost) of + {ok, NamePorts} -> + case proplists:is_defined(NodeName, NamePorts) of + true -> io:format("node with name ~p " + "already running on ~p~n", + [NodeName, NodeHost]), + [io:format(Fmt ++ "~n", Args) || + {Fmt, Args} <- rabbit_control:diagnostics(Node)], + terminate(?ERROR_CODE); + false -> ok + end; + {error, address} -> ok; + {error, EpmdReason} -> terminate("unexpected epmd error:~p~n", + [EpmdReason]) end. terminate(Fmt, Args) -> |