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

improve: checking ev->pending_eof before peeking data from tcp buffer #69

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

Conversation

tokers
Copy link

@tokers tokers commented Jun 30, 2019

No description provided.

@tokers
Copy link
Author

tokers commented Jun 30, 2019

See the relevant issue: openresty/stream-lua-nginx-module#167 for details.

@spacewander
Copy link
Member

Look like the original ngx_http_lua_check_broken_connection is modified from ngx_http_upstream_check_broken_connection in 2012. In 2013, Nginx added the NGX_USE_EPOLL_EVENT check to fix https://trac.nginx.org/nginx/ticket/320.
However, this code doesn't synchronize the fix.

@agentzh
Copy link
Member

agentzh commented Jul 1, 2019

So ngx_http_lua_module also needs a patch.

@tokers
Copy link
Author

tokers commented Jul 1, 2019

So ngx_http_lua_module also needs a patch.

OK, I will push a patch to that repo.

@tokers
Copy link
Author

tokers commented Jul 1, 2019

Look like the original ngx_http_lua_check_broken_connection is modified from ngx_http_upstream_check_broken_connection in 2012. In 2013, Nginx added the NGX_USE_EPOLL_EVENT check to fix https://trac.nginx.org/nginx/ticket/320.
However, this code doesn't synchronize the fix.

Sorry, I can't capture the words. What means of "this code doesn't synchronize the fix"? This patch mainly referenced from ngx_http_upstream_check_broken_connection.

@spacewander
Copy link
Member

@tokers
ngx_http_lua_check_broken_connection doesn't have this patch because it is written in 2012,
while this patch is added to ngx_http_lua_check_broken_connection in 2013.

@tokers
Copy link
Author

tokers commented Jul 1, 2019

@tokers
ngx_http_lua_check_broken_connection doesn't have this patch because it is written in 2012,
while this patch is added to ngx_http_lua_check_broken_connection in 2013.

OK 👌

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

Successfully merging this pull request may close these issues.

3 participants