Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions net/usrsock/usrsock_accept.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ int usrsock_accept(FAR struct socket *psock, FAR struct sockaddr *addr,
{
ninfo("usockid=%d; remote closed (EOF).\n", conn->usockid);

conn->flags &= ~USRSOCK_EVENT_RECVFROM_AVAIL;
ret = -EPIPE;
goto errout_free_conn;
}
Expand Down
16 changes: 14 additions & 2 deletions net/usrsock/usrsock_poll.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,13 @@ static uint32_t poll_event(FAR struct net_driver_s *dev,

/* Remote closed. */

eventset |= (POLLHUP | POLLIN);
eventset |= POLLHUP;
if (flags & USRSOCK_EVENT_RECVFROM_AVAIL)
{
ninfo("socket recv avail.\n");

eventset |= POLLIN;
}
}
else
{
Expand Down Expand Up @@ -217,7 +223,13 @@ static int usrsock_pollsetup(FAR struct socket *psock,

/* Remote closed. */

eventset |= (POLLHUP | POLLIN);
eventset |= POLLHUP;
if (conn->flags & USRSOCK_EVENT_RECVFROM_AVAIL)
{
ninfo("socket recv avail.\n");

eventset |= POLLIN;
}
}
else
{
Expand Down
Loading