summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Sebastien Pedron <jean-sebastien@rabbitmq.com>2014-11-24 18:14:46 +0100
committerJean-Sebastien Pedron <jean-sebastien@rabbitmq.com>2014-11-24 18:14:46 +0100
commitc72c494b5e856f7e475887932dba8b82ea6bbf21 (patch)
tree10ec90c848e6ebc266279a70db82a5e49bb66cd9
parentd7ef19f67576bc2159e4d36245ca806a1773d989 (diff)
parent0f37b94a60a6935a804831d6db371a92fa17ddd8 (diff)
downloadrabbitmq-server-c72c494b5e856f7e475887932dba8b82ea6bbf21.tar.gz
Merge heads of default
-rw-r--r--src/rabbit_mnesia.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rabbit_mnesia.erl b/src/rabbit_mnesia.erl
index 8fbacdae..91a8b140 100644
--- a/src/rabbit_mnesia.erl
+++ b/src/rabbit_mnesia.erl
@@ -121,7 +121,7 @@ init_from_config() ->
case application:get_env(rabbit, cluster_nodes) of
{ok, {Nodes, Type} = Config}
when is_list(Nodes) andalso (Type == disc orelse Type == ram) ->
- case lists:foldl(FindBadNodeNames, [], Nodes) of
+ case lists:foldr(FindBadNodeNames, [], Nodes) of
[] -> Config;
BadNames -> e({invalid_cluster_node_names, BadNames})
end;
@@ -130,9 +130,9 @@ init_from_config() ->
{ok, Nodes} when is_list(Nodes) ->
%% The legacy syntax (a nodes list without the node
%% type) is unsupported.
- case lists:foldl(FindBadNodeNames, [], Nodes) of
- [] -> e(cluster_node_type_mandatory);
- BadNames -> e(invalid_cluster_nodes_conf)
+ case lists:foldr(FindBadNodeNames, [], Nodes) of
+ [] -> e(cluster_node_type_mandatory);
+ _ -> e(invalid_cluster_nodes_conf)
end;
{ok, _} ->
e(invalid_cluster_nodes_conf)