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/07/25 09:51:28 UTC

[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #6701: udp: Use s_sndtimeo as the actual timeout time

pkarashchenko commented on code in PR #6701:
URL: https://github.com/apache/incubator-nuttx/pull/6701#discussion_r928679837


##########
net/udp/udp_sendto_buffered.c:
##########
@@ -650,7 +652,12 @@ ssize_t psock_udp_sendto(FAR struct socket *psock, FAR const void *buf,
               goto errout_with_lock;
             }
 
-          net_lockedwait_uninterruptible(&conn->sndsem);
+          ret = net_timedwait_uninterruptible(&conn->sndsem, timeout);
+          if (ret < 0)
+            {
+              ret = -EAGAIN;

Review Comment:
   What error it intends to catch? How `ECANCELED` is handled? Maybe `timeout != UINT_MAX` is missing?



-- 
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