Patch for concurrent iterator & others (onto v1.11.6) #386

Closed
roysc wants to merge 1565 commits from v1.11.6-statediff-v5 into master
2 changed files with 2 additions and 0 deletions
Showing only changes of commit 656dc8cc00 - Show all commits

View File

@ -237,6 +237,7 @@ func (ps *peerSet) Register(p *peerConnection) error {
}
p.rates = msgrate.NewTracker(ps.rates.MeanCapacities(), ps.rates.MedianRoundTrip())
if err := ps.rates.Track(p.id, p.rates); err != nil {
ps.lock.Unlock()
return err
}
ps.peers[p.id] = p

View File

@ -350,6 +350,7 @@ func (ps *peerSet) Register(p *peerConnection) error {
}
p.rates = msgrate.NewTracker(ps.rates.MeanCapacities(), ps.rates.MedianRoundTrip())
if err := ps.rates.Track(p.id, p.rates); err != nil {
ps.lock.Unlock()
return err
}
ps.peers[p.id] = p