vfs/fs_poll: not clear POLLIN event if POLLHUP or POLLERR set
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
This commit is contained in:
parent
2e1c522a79
commit
5e46a9908a
@ -312,9 +312,9 @@ void poll_notify(FAR struct pollfd **afds, int nfds, pollevent_t eventset)
|
|||||||
fds->revents |= eventset & (fds->events | POLLERR | POLLHUP);
|
fds->revents |= eventset & (fds->events | POLLERR | POLLHUP);
|
||||||
if ((fds->revents & (POLLERR | POLLHUP)) != 0)
|
if ((fds->revents & (POLLERR | POLLHUP)) != 0)
|
||||||
{
|
{
|
||||||
/* Error, clear POLLIN and POLLOUT event */
|
/* Error or Hung up, clear POLLOUT event */
|
||||||
|
|
||||||
fds->revents &= ~(POLLIN | POLLOUT);
|
fds->revents &= ~POLLOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fds->revents != 0)
|
if (fds->revents != 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user