aboutsummaryrefslogtreecommitdiff
path: root/weed/command/master.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2023-09-18 16:12:50 -0700
committerchrislu <chris.lu@gmail.com>2023-09-18 16:12:50 -0700
commit8cb42c39adbbe7f082009cf91eccb4d2dc527235 (patch)
treea4a54f1e1211e273bede5ecc39ed9513316c596d /weed/command/master.go
parent2e5aa06026750c99ea283181974d2ccfe5eb0468 (diff)
downloadseaweedfs-8cb42c39adbbe7f082009cf91eccb4d2dc527235.tar.xz
seaweedfs-8cb42c39adbbe7f082009cf91eccb4d2dc527235.zip
Revert "Merge branch 'master' of https://github.com/seaweedfs/seaweedfs"
This reverts commit 2e5aa06026750c99ea283181974d2ccfe5eb0468, reversing changes made to 4d414f54a224142f3f4d934f4af3b5dceb6fec6b.
Diffstat (limited to 'weed/command/master.go')
-rw-r--r--weed/command/master.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/command/master.go b/weed/command/master.go
index 6a32b8abe..02a155da8 100644
--- a/weed/command/master.go
+++ b/weed/command/master.go
@@ -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