net/tcp: recounter the ack counter during obtain newdata

Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an 2021-05-18 20:30:11 +08:00 committed by Alan Carvalho de Assis
parent 9f9ecffe2e
commit a876f0253a

View File

@ -487,6 +487,13 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
}
else if (ackno == TCP_WBSEQNO(wrb))
{
/* Reset the duplicate ack counter */
if ((flags & TCP_NEWDATA) != 0)
{
TCP_WBNACK(wrb) = 0;
}
/* Duplicate ACK? Retransmit data if need */
if (++TCP_WBNACK(wrb) ==