diff options
Diffstat (limited to 'ports/unix/modsocket.c')
| -rw-r--r-- | ports/unix/modsocket.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ports/unix/modsocket.c b/ports/unix/modsocket.c index 871be8dcf..737550b42 100644 --- a/ports/unix/modsocket.c +++ b/ports/unix/modsocket.c @@ -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; } |
