-
Notifications
You must be signed in to change notification settings - Fork 37.8k
Ensure that http event loop is empty before the loop exit #13485
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
Conversation
This should be simple, I don't think libevent would force such workarounds.
According to the documentation it ignores pending events but active events are handled. And looks like sending the reply is an active event (): Lines 583 to 608 in d6cf4bd
Lines 519 to 525 in d6cf4bd
Maybe there is a problem in when the the event is activ'ated? |
That Lines 229 to 240 in d6cf4bd
|
@ken2812221 so instead it should make sure the reply is handled before |
should make sure the reply is handled before threadHTTP loop exit because the loop can exit earlier than |
@ken2812221 Are you still working on this? |
@MarcoFalke If necessary, I can work on this again. |
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
Tested 4e79d3e on current master and could run the tests for 24 hours in a loop. (Which is not possible on current master) |
Close #11777
This also revert #11006, since
event_base_loopexit
seems to drop unstarted event. So shutdown might take longer.