p2p/enode: close sources added after FairMix shutdown

This commit is contained in:
Ray 2026-07-04 21:37:42 +08:00
parent e3b6d0c86f
commit b45bc75393

View file

@ -356,6 +356,7 @@ func (m *FairMix) AddSource(it Iterator) {
defer m.mu.Unlock()
if m.closed == nil {
it.Close()
return
}
m.wg.Add(1)