Skip to content

Commit

Permalink
avoid concurrent join
Browse files Browse the repository at this point in the history
  • Loading branch information
nolouch committed Oct 23, 2018
1 parent c7ca4fb commit c1729b5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/join.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ func PrepareJoinCluster(cfg *Config) error {
if memb.ID == addResp.Member.ID {
n = cfg.Name
}
if len(n) == 0 {
return errors.New("exsist a member that the join is not completed")
}
for _, m := range memb.PeerURLs {
pds = append(pds, fmt.Sprintf("%s=%s", n, m))
}
Expand Down

0 comments on commit c1729b5

Please sign in to comment.