Skip to content

Commit

Permalink
feat(net): use comparingLong method for sortPeers
Browse files Browse the repository at this point in the history
  • Loading branch information
zeusoo001 committed Jul 1, 2024
1 parent a0497b7 commit c2aea6b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ private static void remove(PeerConnection peerConnection) {
}

public static synchronized void sortPeers() {
peers.sort(Comparator.comparingDouble(c -> c.getChannel().getAvgLatency()));
peers.sort(Comparator.comparingLong(c -> c.getChannel().getAvgLatency()));
}

public static PeerConnection getPeerConnection(Channel channel) {
Expand Down

0 comments on commit c2aea6b

Please sign in to comment.