Skip to content

bugfix: Semaphore not cleaned up on request timeout #2426

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dark264sh
Copy link

After a ngx.semaphore.wait() call, if the current request is terminated by Nginx due to client_header_timeout or client_body_timeout, the corresponding post() is never executed. As a result, all subsequent attempts to wait() on the same semaphore hang until they time out, because the semaphore count was never restored.

#2422

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

After a ngx.semaphore.wait() call, if the current request is terminated by
Nginx due to client_header_timeout or client_body_timeout, the corresponding
post() is never executed. As a result, all subsequent attempts to wait() on
the same semaphore hang until they time out, because the semaphore count was
never restored.

openresty#2422
@zhuizhuhaomeng
Copy link
Contributor

Thanks.
I will review it ASAP.

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.

2 participants