Skip to content

Commit

Permalink
support TCP_SOCKET_STATE_LISTENING sockets in poll
Browse files Browse the repository at this point in the history
Signed-off-by: Joel Dice <[email protected]>
  • Loading branch information
dicej committed Dec 19, 2023
1 parent ef83aa6 commit 0b50784
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libc-bottom-half/cloudlibc/src/libc/poll/poll.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ static int poll_preview2(struct pollfd* fds, size_t nfds, int timeout)
case DESCRIPTOR_TABLE_ENTRY_TCP_SOCKET: {
tcp_socket_t* socket = &(entry->tcp_socket);
switch (socket->state.tag) {
case TCP_SOCKET_STATE_CONNECTING: {
case TCP_SOCKET_STATE_CONNECTING:
case TCP_SOCKET_STATE_LISTENING: {
if ((pollfd->events & (POLLRDNORM | POLLWRNORM)) != 0) {
states[state_index++] = (state_t) {
.pollable = socket->socket_pollable,
Expand Down

0 comments on commit 0b50784

Please sign in to comment.