mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 08:38:38 +08:00
net: Fix unreadable error when doing poll operation on tcp socket.
When do poll operation and the tcp connection state is TCP_ALLOCATED, eventset(POLLERR|POLLHUP) is return, causing the libuv poll_multiple_handles to fail. Verification: Use the libuv test case ` uv_run_tests poll_multiple_handles`. Signed-off-by: liqinhui <liqinhui@xiaomi.com>
This commit is contained in:
parent
78c88b5e78
commit
0100e8338e
1 changed files with 2 additions and 1 deletions
|
@ -219,7 +219,8 @@ int tcp_pollsetup(FAR struct socket *psock, FAR struct pollfd *fds)
|
|||
|
||||
/* Non-blocking connection ? */
|
||||
|
||||
nonblock_conn = (conn->tcpstateflags == TCP_SYN_SENT &&
|
||||
nonblock_conn = ((conn->tcpstateflags == TCP_ALLOCATED ||
|
||||
conn->tcpstateflags == TCP_SYN_SENT) &&
|
||||
_SS_ISNONBLOCK(conn->sconn.s_flags));
|
||||
|
||||
/* Find a container to hold the poll information */
|
||||
|
|
Loading…
Reference in a new issue