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 @@ -763,9 +763,16 @@ func (g *GoBackNConn) receivePacketsForever() error { // nolint:gocyclo
763763
764764 // If we recently sent a NACK for the same
765765 // sequence number then back off.
766+ // We wait 2 times the resendTimeout before
767+ // sending a new nack, as this case is likely
768+ // hit if the sender is currently resending
769+ // the queue, and therefore the threads that
770+ // are resending the queue is likely busy with
771+ // the resend, and therefore won't react to the
772+ // NACK we send here in time.
766773 if lastNackSeq == g .recvSeq &&
767- time .Since (lastNackTime ) < g .resendTimeout {
768- log .Tracef ("%d recently sent NACK for %d" , g . seqTest2 , m . Seq )
774+ time .Since (lastNackTime ) < g .resendTimeout * 2 {
775+ log .Tracef ("Recently sent NACK" )
769776 continue
770777 }
771778
You can’t perform that action at this time.
0 commit comments