mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdserver: not add self to transporter based on local ID
If this is decided by local name, it comes to trouble if the name is duplicate in the cluster.
This commit is contained in:
parent
d0af96d558
commit
7840d49ae0
@ -253,7 +253,7 @@ func NewServer(cfg *ServerConfig) (*EtcdServer, error) {
|
||||
tr := rafthttp.NewTransporter(cfg.Transport, id, cfg.Cluster.ID(), srv, srv.errorc, sstats, lstats)
|
||||
// add all the remote members into sendhub
|
||||
for _, m := range cfg.Cluster.Members() {
|
||||
if m.Name != cfg.Name {
|
||||
if m.ID != id {
|
||||
tr.AddPeer(m.ID, m.PeerURLs)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user