You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ma...@apache.org on 2020/12/18 05:16:21 UTC
[incubator-nuttx] 01/04: net/tcp: send the ack on nonblock mode
This is an automated email from the ASF dual-hosted git repository.
masayuki pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 5e9e50991c45ebb2ad2aff603d4db31d8eedd76b
Author: chao.an <an...@xiaomi.com>
AuthorDate: Tue Dec 15 19:56:05 2020 +0800
net/tcp: send the ack on nonblock mode
Signed-off-by: chao.an <an...@xiaomi.com>
---
net/tcp/tcp_recvfrom.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/tcp/tcp_recvfrom.c b/net/tcp/tcp_recvfrom.c
index a40abd9..1d11d76 100644
--- a/net/tcp/tcp_recvfrom.c
+++ b/net/tcp/tcp_recvfrom.c
@@ -811,8 +811,7 @@ ssize_t psock_tcp_recvfrom(FAR struct socket *psock, FAR void *buf,
/* Receive additional data from read-ahead buffer, send the ACK timely. */
- else if (state.ir_recvlen > 0 && conn->rcv_wnd == 0 &&
- conn->rcv_ackcb == NULL)
+ if (conn->rcv_wnd == 0 && conn->rcv_ackcb == NULL)
{
conn->rcv_ackcb = tcp_callback_alloc(conn);
if (conn->rcv_ackcb)