Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pkg/twcc/arrival_time_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ func (m *packetArrivalTimeMap) EndSequenceNumber() int64 {
}

// FindNextAtOrAfter returns the sequence number and timestamp of the first received packet that has a sequence number
// greator or equal to sequenceNumber.
// greater or equal to sequenceNumber.
func (m *packetArrivalTimeMap) FindNextAtOrAfter(sequenceNumber int64) (
foundSequenceNumber int64, arrivalTime int64, ok bool,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this change but I think it makes this function slightly less readable from foundSequenceNumber int64, arrivalTime int64, ok bool int64, int64, bool, maybe we can move this to the function comment? or name the local variables to foundSequenceNumber and arrivalTime instead of seq and t.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps designating them 'seq' and 'arrivalTime' would ensure adherence to the 72-character constraint.

int64, int64, bool,
) {
for sequenceNumber = m.Clamp(sequenceNumber); sequenceNumber < m.endSequenceNumber; sequenceNumber++ {
if t := m.get(sequenceNumber); t >= 0 {
return sequenceNumber, t, true
for seq := m.Clamp(sequenceNumber); seq < m.endSequenceNumber; seq++ {
if arrivalTime := m.get(seq); arrivalTime >= 0 {
return seq, arrivalTime, true
}
}

Expand Down
Loading