diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2013-04-19 12:24:10 +0100 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2013-04-19 12:24:10 +0100 |
commit | fae3f115c998d01c3792fac1b1beb081871fdd1a (patch) | |
tree | d844e7803cb24644f922dc3e84b6762ad44d332a | |
parent | 58fb136705db9b9ccced0425eabce9b60af04125 (diff) | |
download | rabbitmq-server-bug25523.tar.gz |
Slightly more defensive, and update comment.bug25523
-rw-r--r-- | src/rabbit_node_monitor.erl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/rabbit_node_monitor.erl b/src/rabbit_node_monitor.erl index ecfa75d1..4e801854 100644 --- a/src/rabbit_node_monitor.erl +++ b/src/rabbit_node_monitor.erl @@ -378,7 +378,8 @@ handle_dead_rabbit_state(State = #state{partitions = Partitions}) -> end, ensure_ping_timer(State#state{partitions = Partitions1}). -%% all_nodes_up() both pings all the nodes and tells us if we need to again. +%% Sometimes Mnesia does not seem to detect a partitioned network +%% without a nudge. So let's give it that nudge. ping_nodes(Self) -> DownNodes = [Node || Node <- rabbit_mnesia:cluster_nodes(all), mnesia_recover:has_mnesia_down(Node)], @@ -386,8 +387,11 @@ ping_nodes(Self) -> [] -> ok; _ -> [begin net_adm:ping(Node), - spawn_link(mnesia_monitor, detect_partitioned_network, - [self(), Node]) + spawn_link( + fun () -> + catch mnesia_monitor:detect_partitioned_network( + self(), Node) + end) end || Node <- DownNodes] end. |