mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 04:52:02 +08:00
tcp_input: Add condition to check sndseq and ackseq equality
When triggering TCP retransmission through a timer, conn->unacked_q will save more packets, which may result in sndseq being equal to ackseq. Previous implementations may cause conn->nrtx to not be cleared, leading to an increase in conn->rto errors and a longer timer time Signed-off-by: wangchen <wangchen41@xiaomi.com>
This commit is contained in:
+1
-1
@@ -1070,7 +1070,7 @@ found:
|
||||
*/
|
||||
|
||||
uint32_t sndseq = tcp_getsequence(conn->sndseq);
|
||||
if (TCP_SEQ_LT(sndseq, ackseq))
|
||||
if (TCP_SEQ_LTE(sndseq, ackseq))
|
||||
{
|
||||
ninfo("sndseq: %08" PRIx32 "->%08" PRIx32
|
||||
" unackseq: %08" PRIx32 " new tx_unacked: %" PRIu32 "\n",
|
||||
|
||||
Reference in New Issue
Block a user