unix/modsocket: Add poll support for missing ERR,HUP,NVAL poll values.

Signed-off-by: Damien George <damien@micropython.org>
pull/12138/head
Damien George 2023-07-31 12:21:21 +10:00
rodzic b714f41812
commit 6a179019e8
1 zmienionych plików z 9 dodań i 0 usunięć

Wyświetl plik

@ -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;
}