Skip to content

Commit c57fa56

Browse files
committed
fix >= check for SNA
1 parent ab755db commit c57fa56

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

received_chunk_tracker.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
// receivedChunkTracker tracks received chunks for maintaining ACK ranges
1212
type receivedChunkTracker struct {
13-
tsns map[uint32]struct{}
13+
tsns map[uint32]struct{}
1414
dupTSN []uint32
1515
ranges []ackRange
1616
}
@@ -72,7 +72,7 @@ func (q *receivedChunkTracker) push(tsn uint32, cumulativeTSN uint32) bool {
7272
} else {
7373
// extended element at pos, check if we can merge it with adjacent elements
7474
if pos-1 >= 0 {
75-
if q.ranges[pos-1].end+1 >= q.ranges[pos].start {
75+
if q.ranges[pos-1].end+1 == q.ranges[pos].start {
7676
q.ranges[pos-1] = ackRange{
7777
start: q.ranges[pos-1].start,
7878
end: q.ranges[pos].end,
@@ -85,7 +85,7 @@ func (q *receivedChunkTracker) push(tsn uint32, cumulativeTSN uint32) bool {
8585
}
8686
}
8787
if pos+1 < len(q.ranges) {
88-
if q.ranges[pos].end+1 >= q.ranges[pos+1].start {
88+
if q.ranges[pos].end+1 == q.ranges[pos+1].start {
8989
q.ranges[pos+1] = ackRange{
9090
start: q.ranges[pos].start,
9191
end: q.ranges[pos+1].end,

0 commit comments

Comments
 (0)