diff options
-rw-r--r-- | src/rabbit_mnesia.erl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/rabbit_mnesia.erl b/src/rabbit_mnesia.erl index db4c58ca..d6c6f360 100644 --- a/src/rabbit_mnesia.erl +++ b/src/rabbit_mnesia.erl @@ -676,10 +676,12 @@ remove_node_if_mnesia_running(Node) -> end. leave_cluster() -> - AllNodes = cluster_nodes(all) -- [node()], - case not is_clustered() orelse lists:any(fun leave_cluster/1, AllNodes) of - true -> ok; - false -> e(no_running_cluster_nodes) + case nodes_excl_me(cluster_nodes(all)) of + [] -> ok; + AllNodes -> case lists:any(fun leave_cluster/1, AllNodes) of + true -> ok; + false -> e(no_running_cluster_nodes) + end end. leave_cluster(Node) -> |