diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2013-04-08 15:56:01 +0100 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2013-04-08 15:56:01 +0100 |
| commit | dec8a32b5a308eb16d96ff53c5d1d6d2f9e4d796 (patch) | |
| tree | bfc93bdeecba1eb70c053c101c8c89921f869598 | |
| parent | aa9bf5fd8bca669a703a4f5fb46c3b76ff3e8e18 (diff) | |
| download | rabbitmq-server-git-dec8a32b5a308eb16d96ff53c5d1d6d2f9e4d796.tar.gz | |
Umm, order by *best* partition first!
| -rw-r--r-- | src/rabbit_node_monitor.erl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rabbit_node_monitor.erl b/src/rabbit_node_monitor.erl index edb197fa26..7fd20f8c06 100644 --- a/src/rabbit_node_monitor.erl +++ b/src/rabbit_node_monitor.erl @@ -506,8 +506,9 @@ autoheal(State) -> State. autoheal_select_winner(AllPartitions) -> - {_, [Winner | _]} = hd(lists:sort( - [{autoheal_value(P), P} || P <- AllPartitions])), + {_, [Winner | _]} = + hd(lists:reverse( + lists:sort([{autoheal_value(P), P} || P <- AllPartitions]))), Winner. autoheal_value(Partition) -> |
