File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -652,9 +652,16 @@ func (g *GoBackNConn) receivePacketsForever() error { // nolint:gocyclo
652652
653653 // If we recently sent a NACK for the same
654654 // sequence number then back off.
655+ // We wait 2 times the resendTimeout before
656+ // sending a new nack, as this case is likely
657+ // hit if the sender is currently resending
658+ // the queue, and therefore the threads that
659+ // are resending the queue is likely busy with
660+ // the resend, and therefore won't react to the
661+ // NACK we send here in time.
655662 if lastNackSeq == g .recvSeq &&
656- time .Since (lastNackTime ) < g .resendTimeout {
657- log .Tracef ("%d recently sent NACK for %d" , g . seqTest2 , m . Seq )
663+ time .Since (lastNackTime ) < g .resendTimeout * 2 {
664+ log .Tracef ("Recently sent NACK" )
658665 continue
659666 }
660667
You can’t perform that action at this time.
0 commit comments