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 {
133
133
return nil
134
134
}
135
135
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.
137
139
func (q * queue ) processACK (seq uint8 ) bool {
138
140
139
141
// If our queue is empty, an ACK should not have any effect.
@@ -204,8 +206,10 @@ func (q *queue) processNACK(seq uint8) (bool, bool) {
204
206
q .cfg .log .Tracef ("Received NACK %d" , seq )
205
207
206
208
// If the NACK is the same as sequenceTop, it probably means that queue
207
- // was sent successfully, but we just missed the necessary ACKs. So we
208
- // can empty the queue here by bumping the base and we dont need to
209
+ // was sent successfully, but due to latency we timed out and resent the
210
+ // queue before we received the ACKs for the sent packages.
211
+ // Alternatively, we might have just missed the necessary ACKs. So we
212
+ // can empty the queue here by bumping the base and we don't need to
209
213
// trigger a resend.
210
214
if seq == q .sequenceTop {
211
215
q .sequenceBase = q .sequenceTop
You can’t perform that action at this time.
0 commit comments