Merge pull request #2747 from lucas-clemente/simplify-sent-packet-history

refactor RTT measurements to simplify the sentPacketHistory
This commit is contained in:
Marten Seemann
2020-09-09 23:50:26 +07:00
committed by GitHub
3 changed files with 19 additions and 37 deletions

View File

@@ -23,13 +23,6 @@ func (h *sentPacketHistory) SentPacket(p *Packet) {
h.packetMap[p.PacketNumber] = el
}
func (h *sentPacketHistory) GetPacket(p protocol.PacketNumber) *Packet {
if el, ok := h.packetMap[p]; ok {
return &el.Value
}
return nil
}
// Iterate iterates through all packets.
func (h *sentPacketHistory) Iterate(cb func(*Packet) (cont bool, err error)) error {
cont := true