net/tcp: Do not trigger retransmission if the new data has not been consumed.

Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
chao an 2023-01-03 13:43:00 +08:00 committed by Xiang Xiao
parent 56c6943311
commit 1510dbee68
1 changed files with 2 additions and 1 deletions

View File

@ -804,7 +804,8 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
*/ */
if ((conn->tcpstateflags & TCP_ESTABLISHED) && if ((conn->tcpstateflags & TCP_ESTABLISHED) &&
(flags & (TCP_POLL | TCP_REXMIT)) && ((flags & TCP_NEWDATA) == 0) &&
(flags & (TCP_POLL | TCP_REXMIT | TCP_ACKDATA)) &&
!(sq_empty(&conn->write_q)) && !(sq_empty(&conn->write_q)) &&
conn->snd_wnd > 0) conn->snd_wnd > 0)
{ {