Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on destruct evpp::Connector #271

Open
zccrs opened this issue Jul 12, 2021 · 0 comments
Open

Crash on destruct evpp::Connector #271

zccrs opened this issue Jul 12, 2021 · 0 comments

Comments

@zccrs
Copy link

zccrs commented Jul 12, 2021

image

Test code:

static void fun(evpp::EventLoop *loop, evnsq::Producer *p, const std::string &add) {
    std::cout << "ffffffffffff" << std::endl;
    p->SetCloseCallback([=] {
        p->ConnectToNSQD(add);
    });
    p->Close();
    loop->RunAfter(evpp::Duration(2.0), std::bind(fun, loop, p, add));
}

int main(int argc, char **argv)
{
    evpp::EventLoop loop;
    evnsq::Option option;
    evnsq::Producer p(&loop, option);
    p.ConnectToNSQD("xx.xx.xx.xx:xxxx");
    p.SetReadyCallback([&] {
        std::cout << "rrrrrrrrrrrrrrrrrrrrrr~~~~~~~~~~~~~~~~~~~~~~~~"  << std::endl;
        fun(&loop, &p, "xx.xx.xx.xx:xxxx");
    });
    loop.Run();
}

Step 1: Run the application in a network connection environment
Step 2: Wait 3s
Step 3: Disconnect the network

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant