summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2012-02-01 15:12:53 +0000
committerSimon MacMullen <simon@rabbitmq.com>2012-02-01 15:12:53 +0000
commitbb4ca859ed905beb0133af5b4ce2d0ab3852e6d6 (patch)
treea8f478f77f920dd5c103fa24d871289f9e33c2f9
parent2d6e33f14a5a4bf187b57810bd2802b25274d9ba (diff)
downloadrabbitmq-server-bb4ca859ed905beb0133af5b4ce2d0ab3852e6d6.tar.gz
OTOH if we're not trying to cluster with anything we should probably be happy.
-rw-r--r--src/rabbit_mnesia.erl13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/rabbit_mnesia.erl b/src/rabbit_mnesia.erl
index 75ad3dc8..0f9a6a7a 100644
--- a/src/rabbit_mnesia.erl
+++ b/src/rabbit_mnesia.erl
@@ -521,12 +521,13 @@ init_db(ClusterNodes, Force, SecondaryPostMnesiaFun) ->
ProperClusterNodes = UClusterNodes -- [node()],
case mnesia:change_config(extra_db_nodes, ProperClusterNodes) of
{ok, Nodes} ->
- case {Nodes, Force} of
- {[], false} -> throw({error, {failed_to_cluster_with,
- ProperClusterNodes,
- "Mnesia could not connect "
- "to any disc nodes."}});
- _ -> ok
+ case {ProperClusterNodes, Nodes, Force} of
+ {[], [], false} -> ok;
+ {_, [], false} -> throw({error, {failed_to_cluster_with,
+ ProperClusterNodes,
+ "Mnesia could not connect "
+ "to any disc nodes."}});
+ _ -> ok
end,
WasDiscNode = is_disc_node(),
WantDiscNode = should_be_disc_node(ClusterNodes),