You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "xiaoxiang781216 (via GitHub)" <gi...@apache.org> on 2023/01/27 20:09:24 UTC

[GitHub] [nuttx] xiaoxiang781216 opened a new pull request, #8316: socket:return -EAGAIN if timeout happends in psock_tcp_send

xiaoxiang781216 opened a new pull request, #8316:
URL: https://github.com/apache/nuttx/pull/8316

   ## Summary
   
   psock_tcp_send will enter busyloop state when no IOB keeps at unavailable state when the socket is blocking socket and this will cause WDT. According to socket's manpage, -1 should be returned while errno set to EAGAIN if send/recv timeout was set.
   
   Here's the description:
   SO_RCVTIMEO and SO_SNDTIMEO
   Specify the receiving or sending timeouts until reporting an error. The argument is a struct timeval. If an input or output function blocks for this period of time, and data has been sent or received, the return value of that function will be the amount of data transferred; if no data has been transferred and the timeout has been reached then -1 is returned with errno set to EAGAIN or EWOULDBLOCK, or EINPROGRESS (for connect(2)) just as if the socket was specified to be nonblocking. If the timeout is set to zero (the default) then the operation will never timeout. Timeouts only have effect for system calls that perform socket I/O (e.g., read(2), recvmsg(2), send(2), sendmsg(2)); timeouts have no effect for select(2), poll(2), epoll_wait(2), and so on.
   
   ## Impact
   
   when exhaust iob 
   
   ## Testing
   
   Xiaomi AI Speaker
   


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


[GitHub] [nuttx] pkarashchenko merged pull request #8316: socket:return -EAGAIN if timeout happends in psock_tcp_send

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko merged PR #8316:
URL: https://github.com/apache/nuttx/pull/8316


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