From 1ae7f509f5724deb782e87a02001ec4a7884bc6e Mon Sep 17 00:00:00 2001 From: Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.com> Date: Tue, 5 Apr 2022 13:50:39 +0500 Subject: [PATCH] LocalID from raw string --- weed/server/raft_hashicorp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/server/raft_hashicorp.go b/weed/server/raft_hashicorp.go index 892cddf43..3d71be279 100644 --- a/weed/server/raft_hashicorp.go +++ b/weed/server/raft_hashicorp.go @@ -73,7 +73,7 @@ func NewHashicorpRaftServer(option *RaftServerOption) (*RaftServer, error) { } c := raft.DefaultConfig() - c.LocalID = raft.ServerID(s.serverAddr.String()) // TODO maybee the IP:port address will change + c.LocalID = raft.ServerID(s.serverAddr) // TODO maybee the IP:port address will change c.NoSnapshotRestoreOnStart = option.RaftResumeState c.HeartbeatTimeout = time.Duration(float64(option.HeartbeatInterval) * (rand.Float64()*0.25 + 1)) c.ElectionTimeout = option.ElectionTimeout