Skip to content

bugfix: we closed listener's fd which was closed. #1832

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

Merged
merged 3 commits into from
Dec 3, 2020

Conversation

spacewander
Copy link
Member

fix #1806
fix #1830

I hereby granted the copyright of the changes in this pull request
to the authors of this lua-nginx-module project.

@spacewander
Copy link
Member Author

Test case is in openresty/lua-resty-core#331

if (ls[i].fd != (ngx_socket_t) -1 &&
ngx_close_socket(ls[i].fd) == -1)
{
ngx_log_error(NGX_LOG_WARN, ngx_cycle->log, ngx_socket_errno,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm glad that we seem to agree on the severity level; if we are to downgrade this log to warn (which I believe is appropriate), don't we ought it too to lower the below logs as well? That is, all calls to ngx_log_error that aren't followed by exit() I mean.

That said, not a blocker for this fix of course, since the above check in the condition is all this PR should need 👍

@spacewander spacewander merged commit 99ea68a into openresty:master Dec 3, 2020
ghost pushed a commit to Kong/kong-build-tools that referenced this pull request Mar 23, 2021
ghost pushed a commit to Kong/kong-build-tools that referenced this pull request Mar 24, 2021
ghost pushed a commit to Kong/kong-build-tools that referenced this pull request Mar 24, 2021
ghost pushed a commit to Kong/kong-build-tools that referenced this pull request Mar 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mutiple worker_processes cause Bad file descriptor on Alpine3.12 openresty/1.19.3.1 9: Bad file descriptor
2 participants