Skip to content

Commit

Permalink
Use revents in struct pollfd to check the result of poll()
Browse files Browse the repository at this point in the history
`events` in struct pollfd is the input argument, while `revents` is
for output and should be checked for the result of poll().

Reviewed-by: [email protected]
Reviewed-by: [email protected]
  • Loading branch information
zhangyue-hashdata authored Nov 25, 2024
1 parent 9a670c1 commit d0454c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/interconnect/udp/ic_udpifc.c
Original file line number Diff line number Diff line change
Expand Up @@ -6555,7 +6555,7 @@ rxThreadFunc(void *arg)
continue;
}

if (skip_poll || (n == 1 && (nfd.events & POLLIN)))
if (skip_poll || (n == 1 && (nfd.revents & POLLIN)))
{
/* we've got something interesting to read */
/* handle incoming */
Expand Down

0 comments on commit d0454c3

Please sign in to comment.