|
|
@@ -107,7 +107,7 @@ type peer struct {
|
|
|
done chan struct{}
|
|
|
}
|
|
|
|
|
|
-func startPeer(tr http.RoundTripper, urls types.URLs, local, to, cid types.ID, r Raft, fs *stats.FollowerStats, errorc chan error) *peer {
|
|
|
+func startPeer(tr http.RoundTripper, urls types.URLs, local, to, cid types.ID, r Raft, fs *stats.FollowerStats, errorc chan error, term uint64) *peer {
|
|
|
picker := newURLPicker(urls)
|
|
|
status := newPeerStatus(to)
|
|
|
p := &peer{
|
|
|
@@ -143,8 +143,8 @@ func startPeer(tr http.RoundTripper, urls types.URLs, local, to, cid types.ID, r
|
|
|
}
|
|
|
}()
|
|
|
|
|
|
- p.msgAppReader = startStreamReader(tr, picker, streamTypeMsgAppV2, local, to, cid, status, p.recvc, p.propc, errorc)
|
|
|
- reader := startStreamReader(tr, picker, streamTypeMessage, local, to, cid, status, p.recvc, p.propc, errorc)
|
|
|
+ p.msgAppReader = startStreamReader(tr, picker, streamTypeMsgAppV2, local, to, cid, status, p.recvc, p.propc, errorc, term)
|
|
|
+ reader := startStreamReader(tr, picker, streamTypeMessage, local, to, cid, status, p.recvc, p.propc, errorc, term)
|
|
|
go func() {
|
|
|
var paused bool
|
|
|
for {
|