From ede54cad35407ca26a76f8ceab1dc4da5baaa12e Mon Sep 17 00:00:00 2001 From: "chao.an" Date: Tue, 15 Dec 2020 19:56:05 +0800 Subject: [PATCH] net/tcp: send the ack on nonblock mode Change-Id: Ib5b74a97393c3fed4cc00c3678d738c1cb27ce1a Signed-off-by: chao.an --- 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 158fe7c73f3..b156241c8ef 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)