don't queue the currently active conn ID when receiving a duplicate

This commit is contained in:
Marten Seemann
2019-11-24 09:35:14 +07:00
parent 92b898e811
commit a53569839c
2 changed files with 20 additions and 0 deletions

View File

@@ -89,6 +89,10 @@ func (h *connIDManager) add(f *wire.NewConnectionIDFrame) error {
h.retiredPriorTo = f.RetirePriorTo
}
if f.SequenceNumber == h.activeSequenceNumber {
return nil
}
// insert a new element at the end
if h.queue.Len() == 0 || h.queue.Back().Value.SequenceNumber < f.SequenceNumber {
h.queue.PushBack(utils.NewConnectionID{