You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/01/03 08:28:36 UTC
[nuttx] branch master updated: net/tcp: Do not trigger retransmission if the new data has not been consumed.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 1510dbee68 net/tcp: Do not trigger retransmission if the new data has not been consumed.
1510dbee68 is described below
commit 1510dbee6885359f99ff43eb0ac7ac0a1a6a9bd3
Author: chao an <an...@xiaomi.com>
AuthorDate: Tue Jan 3 13:43:00 2023 +0800
net/tcp: Do not trigger retransmission if the new data has not been consumed.
Signed-off-by: chao an <an...@xiaomi.com>
---
net/tcp/tcp_send_buffered.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/tcp/tcp_send_buffered.c b/net/tcp/tcp_send_buffered.c
index bc30d4956b..e0a24e52e2 100644
--- a/net/tcp/tcp_send_buffered.c
+++ b/net/tcp/tcp_send_buffered.c
@@ -804,7 +804,8 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
*/
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)) &&
conn->snd_wnd > 0)
{