Преглед изворни кода

rafthttp: make newRemote simpler

Xiang Li пре 9 година
родитељ
комит
ba68d7bbe6
2 измењених фајлова са 2 додато и 2 уклоњено
  1. 1 1
      rafthttp/remote.go
  2. 1 1
      rafthttp/transport.go

+ 1 - 1
rafthttp/remote.go

@@ -25,7 +25,7 @@ type remote struct {
 	pipeline *pipeline
 }
 
-func startRemote(tr *Transport, urls types.URLs, local, to, cid types.ID, r Raft, errorc chan error) *remote {
+func startRemote(tr *Transport, urls types.URLs, to types.ID, r Raft, errorc chan error) *remote {
 	picker := newURLPicker(urls)
 	status := newPeerStatus(to)
 	pipeline := &pipeline{

+ 1 - 1
rafthttp/transport.go

@@ -225,7 +225,7 @@ func (t *Transport) AddRemote(id types.ID, us []string) {
 	if err != nil {
 		plog.Panicf("newURLs %+v should never fail: %+v", us, err)
 	}
-	t.remotes[id] = startRemote(t, urls, t.ID, id, t.ClusterID, t.Raft, t.ErrorC)
+	t.remotes[id] = startRemote(t, urls, id, t.Raft, t.ErrorC)
 }
 
 func (t *Transport) AddPeer(id types.ID, us []string) {