You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/02/18 06:08:19 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #5526: net/tcp: add support for send timeout on buffer mode

xiaoxiang781216 commented on a change in pull request #5526:
URL: https://github.com/apache/incubator-nuttx/pull/5526#discussion_r809700327



##########
File path: net/tcp/tcp_send_buffered.c
##########
@@ -1210,11 +1247,11 @@ ssize_t psock_tcp_send(FAR struct socket *psock, FAR const void *buf,
             {
               wrb = tcp_wrbuffer_tryalloc();
               ninfo("new wrb %p (non blocking)\n", wrb);
-              DEBUGASSERT(wrb == NULL || TCP_WBPKTLEN(wrb) == 0);
             }
           else
             {
-              wrb = tcp_wrbuffer_alloc();
+              wrb = tcp_wrbuffer_timedalloc(tcp_send_gettimeout(start,
+                                                                timeout));
               ninfo("new wrb %p\n", wrb);
               DEBUGASSERT(TCP_WBPKTLEN(wrb) == 0);

Review comment:
       should we remove DEBUGASSERT?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org