소스 검색

Merge pull request #2274 from xiang90/fix_stats

rafthttp: remove follower from leaderstats when it is removed from the c...
Xiang Li 11 년 전
부모
커밋
96ea0ff45c
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      rafthttp/transport.go

+ 1 - 0
rafthttp/transport.go

@@ -134,6 +134,7 @@ func (t *transport) RemovePeer(id types.ID) {
 	defer t.mu.Unlock()
 	t.peers[id].Stop()
 	delete(t.peers, id)
+	delete(t.leaderStats.Followers, id.String())
 }
 
 func (t *transport) UpdatePeer(id types.ID, urls []string) {