This is an automated email from the ASF dual-hosted git repository.

gfphoenix78 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git


The following commit(s) were added to refs/heads/main by this push:
     new d0454c3ccb Use revents in struct pollfd to check the result of poll()
d0454c3ccb is described below

commit d0454c3ccba02b7b4bad7e44bddc24e9cfff2ce5
Author: YueZhang <[email protected]>
AuthorDate: Mon Nov 25 15:39:50 2024 +0800

    Use revents in struct pollfd to check the result of poll()
    
    `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]
---
 contrib/interconnect/udp/ic_udpifc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/interconnect/udp/ic_udpifc.c 
b/contrib/interconnect/udp/ic_udpifc.c
index 5c6331448b..a381b4ea5b 100644
--- a/contrib/interconnect/udp/ic_udpifc.c
+++ b/contrib/interconnect/udp/ic_udpifc.c
@@ -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 */


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to