From e03c2c321a84035503a9daba02f887cc8d34f842 Mon Sep 17 00:00:00 2001 From: zhanghongyu Date: Tue, 26 Jul 2022 14:03:48 +0800 Subject: [PATCH] tcp: reset conn->nrtx when ack received Otherwise, when a long test triggers multiple timeout retransmissions, the late timeout retransmissions are always delayed between 24 and 48 seconds Signed-off-by: zhanghongyu --- net/tcp/tcp_input.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/tcp/tcp_input.c b/net/tcp/tcp_input.c index f51c17a4cf..0c65a515f4 100644 --- a/net/tcp/tcp_input.c +++ b/net/tcp/tcp_input.c @@ -773,6 +773,7 @@ found: tcp_getsequence(conn->sndseq), ackseq, unackseq, (uint32_t)conn->tx_unacked); tcp_setsequence(conn->sndseq, ackseq); + conn->nrtx = 0; } } #endif