Skip to content

Commit

Permalink
Update agent.go
Browse files Browse the repository at this point in the history
  • Loading branch information
wind-c authored Jul 31, 2024
1 parent 2bbdfb0 commit d1e021d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions cluster/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,9 @@ func NewAgent(conf *config.Cluster) *Agent {

func (a *Agent) Start() (err error) {
// setup raft
if a.Config.DiscoveryWay == config.DiscoveryWayMemberlist {
if a.Config.RaftPort == 0 || a.Config.DiscoveryWay == config.DiscoveryWayMemberlist {
a.Config.RaftPort = mlist.GetRaftPortFromBindPort(a.Config.BindPort)
}
if a.Config.RaftPort == 0 {
a.Config.RaftPort = 8946
}
if a.Config.RaftDir == "" {
a.Config.RaftDir = path.Join("data", a.Config.NodeName)
}
Expand Down

0 comments on commit d1e021d

Please sign in to comment.