File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -133,7 +133,9 @@ func (q *queue) resend() error {
133133 return nil
134134}
135135
136- // processACK processes an incoming ACK of a given sequence number.
136+ // processACK processes an incoming ACK of a given sequence number. The function
137+ // returns true if the passed seq is an ACK for a packet we have sent but not
138+ // yet received an ACK for.
137139func (q * queue ) processACK (seq uint8 ) bool {
138140
139141 // If our queue is empty, an ACK should not have any effect.
@@ -206,8 +208,10 @@ func (q *queue) processNACK(seq uint8) (bool, bool) {
206208 var bumped bool
207209
208210 // If the NACK is the same as sequenceTop, it probably means that queue
209- // was sent successfully, but we just missed the necessary ACKs. So we
210- // can empty the queue here by bumping the base and we dont need to
211+ // was sent successfully, but due to latency we timed out and resent the
212+ // queue before we received the ACKs for the sent packages.
213+ // Alternatively, we might have just missed the necessary ACKs. So we
214+ // can empty the queue here by bumping the base and we don't need to
211215 // trigger a resend.
212216 if seq == q .sequenceTop {
213217 q .sequenceBase = q .sequenceTop
You can’t perform that action at this time.
0 commit comments