mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-01-12 08:34:43 +08:00
fix: backport sort_by->sort_unstable_by for neighbor pruning
This commit is contained in:
@@ -199,9 +199,11 @@ impl PeerNetwork {
|
||||
match org_neighbors.get_mut(&org) {
|
||||
None => {}
|
||||
Some(ref mut neighbor_infos) => {
|
||||
neighbor_infos.sort_by(|&(ref _nk1, ref stats1), &(ref _nk2, ref stats2)| {
|
||||
PeerNetwork::compare_neighbor_uptime_health(stats1, stats2)
|
||||
});
|
||||
neighbor_infos.sort_unstable_by(
|
||||
|&(ref _nk1, ref stats1), &(ref _nk2, ref stats2)| {
|
||||
PeerNetwork::compare_neighbor_uptime_health(stats1, stats2)
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user