Browse Source

rafthttp: cleanup prober when stopping the transport

Xiang Li 10 năm trước cách đây
mục cha
commit
1e048b5c24
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      rafthttp/transport.go

+ 1 - 0
rafthttp/transport.go

@@ -171,6 +171,7 @@ func (t *transport) Stop() {
 	for _, p := range t.peers {
 		p.Stop()
 	}
+	t.prober.RemoveAll()
 	if tr, ok := t.roundTripper.(*http.Transport); ok {
 		tr.CloseIdleConnections()
 	}