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 | 79ecab90cfaded68f596cf3783f907ffe8c106f2 (patch) | |
tree | bfc93bdeecba1eb70c053c101c8c89921f869598 | |
parent | f722ead2119d5ffc9baf131999d783723e24190d (diff) | |
download | rabbitmq-server-79ecab90cfaded68f596cf3783f907ffe8c106f2.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 edb197fa..7fd20f8c 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) -> |