diff --git a/net/tcp/tcp_send_buffered.c b/net/tcp/tcp_send_buffered.c index d7be8d0d8b..925d08bb12 100644 --- a/net/tcp/tcp_send_buffered.c +++ b/net/tcp/tcp_send_buffered.c @@ -1361,7 +1361,8 @@ ssize_t psock_tcp_send(FAR struct socket *psock, FAR const void *buf, tcp_wrbuffer_release(wrb); } - if (nonblock) + if (nonblock || (timeout != UINT_MAX && + tcp_send_gettimeout(start, timeout) == 0)) { nerr("ERROR: Failed to add data to the I/O chain\n"); ret = -EAGAIN;