summaryrefslogtreecommitdiff
path: root/src/rabbit_prelaunch.erl
diff options
context:
space:
mode:
authorEmile Joubert <emile@rabbitmq.com>2010-12-07 12:57:36 +0000
committerEmile Joubert <emile@rabbitmq.com>2010-12-07 12:57:36 +0000
commitecc3f04426cd3e496e03bf279c5521e32d02adde (patch)
treee0ec4ae0c21cac13e10aa1a28e4f3abbdc3982ba /src/rabbit_prelaunch.erl
parente279f44c444dc59e75f51b89ce140d0eb2dd2f6b (diff)
downloadrabbitmq-server-ecc3f04426cd3e496e03bf279c5521e32d02adde.tar.gz
Remove redundant code
Diffstat (limited to 'src/rabbit_prelaunch.erl')
-rw-r--r--src/rabbit_prelaunch.erl34
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) ->