Skip to content

Commit

Permalink
unix/modsocket: Add poll support for missing ERR,HUP,NVAL poll values.
Browse files Browse the repository at this point in the history
Signed-off-by: Damien George <damien@micropython.org>
  • Loading branch information
dpgeorge committed Aug 6, 2023
1 parent b714f41 commit 6a17901
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ports/unix/modsocket.c
Expand Up @@ -164,6 +164,15 @@ STATIC mp_uint_t socket_ioctl(mp_obj_t o_in, mp_uint_t request, uintptr_t arg, i
if (pfd.revents & POLLOUT) {
ret |= MP_STREAM_POLL_WR;
}
if (pfd.revents & POLLERR) {
ret |= MP_STREAM_POLL_ERR;
}
if (pfd.revents & POLLHUP) {
ret |= MP_STREAM_POLL_HUP;
}
if (pfd.revents & POLLNVAL) {
ret |= MP_STREAM_POLL_NVAL;
}
}
return ret;
}
Expand Down

0 comments on commit 6a17901

Please sign in to comment.