diff --git a/gbn/gbn_conn.go b/gbn/gbn_conn.go index 6614c355..b0c07d50 100644 --- a/gbn/gbn_conn.go +++ b/gbn/gbn_conn.go @@ -569,8 +569,17 @@ func (g *GoBackNConn) receivePacketsForever() error { // nolint:gocyclo // If we recently sent a NACK for the same // sequence number then back off. + // We wait 2 times the resendTimeout before + // sending a new nack, as this case is likely + // hit if the sender is currently resending + // the queue, and therefore the threads that + // are resending the queue is likely busy with + // the resend, and therefore won't react to the + // NACK we send here in time. if lastNackSeq == g.recvSeq && - time.Since(lastNackTime) < g.resendTimeout { + time.Since(lastNackTime) < g.resendTimeout*2 { + + log.Tracef("Recently sent NACK") continue }