Skip to content

In function nni_posix_poll_thr losing EPOLLHUP flag causes the code in this function tcp_cb to be executed incorrectly and continue #2100

Open
@wangchen61698

Description

Describe the bug
I encountered potential bugs using nng(v1.5.2)
In posix_pollq_epoll.c,fuction nni_posix_poll_thr,the value mask will recoder EPOLLIN,EPOLLOUT and EPOLLERR these flag(line279 ~ line281).If the ev->events includes EPOLLHUP flag,The mask will lose EPOLLHUP flag.
Image
When the excuted cb is function tcp_cb
The check condition of the event(posix_tcpconn.c line236 ~239) is to check NNI_POLL_HUP,NNI_POLL_ERR and NNI_POLL_INVAL.
Image
However in fuction nni_posix_poll_thr, It loses EPOLLHUP flag,the tcp_cb don’t check the flag,The code continues to execute incorrectly
Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions