From 3d4925c2c72aa6ddae36720e81b08f3b4d3b23a4 Mon Sep 17 00:00:00 2001 From: Nonoo Date: Sun, 25 Oct 2020 16:25:39 +0100 Subject: [PATCH] Ignore already present entries in the seqbuf --- seqbuf.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/seqbuf.go b/seqbuf.go index 71d0bc7..5d39b54 100644 --- a/seqbuf.go +++ b/seqbuf.go @@ -163,7 +163,7 @@ func (s *seqBuf) add(seq seqNum, data []byte) error { // This seqnum is already in the queue, but not as the first entry? It's not a duplicate packet. // It can be a beginning of a new stream for example. if s.entries[i].seq == seq { - s.addToFront(seq, data) + // s.addToFront(seq, data) return nil } @@ -263,6 +263,7 @@ func (s *seqBuf) watcher() { } // Setting a max. seqnum diff is optional. If it's 0 then the diff will be half of the maxSeqNum range. +// Available entries coming out from the seqbuf will be sent to entryChan. func (s *seqBuf) init(length time.Duration, maxSeqNum, maxSeqNumDiff seqNum, entryChan chan seqBufEntry) { s.length = length s.maxSeqNum = maxSeqNum