net: lib: sockets: Unable to select() file descriptors with number >= 32 #34563
Labels
area: Networking
area: POSIX
POSIX API Library
area: Sockets
Networking sockets
bug
The issue is a bug, or the PR is fixing a bug
priority: medium
Medium impact/importance bug
Describe the bug
zsock_select() cannot poll file descriptors if all the file descriptors in readfds or writefds are all greater than or equal to 32.
To Reproduce
Solution
In zsock_select(), when there is no any bit set in the first 32 bits of readfds, we should still add 32 to fd_no before iterating to next bitset, so I add
fd_no += 32;
as following (code in red color):Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: