This reverts commit 2e5aa06026, reversing
changes made to 4d414f54a2.
This commit is contained in:
chrislu
2023-09-18 16:12:50 -07:00
parent 2e5aa06026
commit 8cb42c39ad
26 changed files with 123 additions and 235 deletions

View File

@@ -288,8 +288,8 @@ func checkPeers(masterIp string, masterPort int, masterGrpcPort int, peers strin
}
func isTheFirstOne(self pb.ServerAddress, peers []pb.ServerAddress) bool {
slices.SortFunc(peers, func(a, b pb.ServerAddress) int {
return strings.Compare(string(a), string(b))
slices.SortFunc(peers, func(a, b pb.ServerAddress) bool {
return strings.Compare(string(a), string(b)) < 0
})
if len(peers) <= 0 {
return true