- Notifications
You must be signed in to change notification settings - Fork 2.1k
feature: support socket in some block phase#1825
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
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
Conversation
cf8a31d to d171684Compared171684 to 64c3805Compare7b2ce35 to ee498c3CompareUh oh!
There was an error while loading. Please reload this page.
972f3d4 to f083783Compare836cadf to 96f98b8Comparea109164 to 9d3c4adCompareThis pull request is now in conflict :( |
| if (revents& (EPOLLERR|EPOLLHUP)){ | ||
| ngx_log_debug2(NGX_LOG_DEBUG_EVENT, r->connection->log, 0, | ||
| "epoll_wait() error on fd:%d ev:%04XD", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "epoll_wait() error on fd:%d ev:%04XD", | |
| "lua epoll_wait() error on fd:%d ev:%04XD", |
| } | ||
| if (events==0){ | ||
| ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, | |
| if (timer!=NGX_TIMER_INFINITE){ | |
| returnNGX_OK; | |
| } | |
| ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, |
| } | ||
| if (events==0){ | ||
| ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, | |
| if (timer!=NGX_TIMER_INFINITE){ | |
| returnNGX_OK; | |
| } | |
| ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, |
| } | ||
| if (ready==0){ | ||
| ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, | |
| if (timer!=NGX_TIMER_INFINITE){ | |
| returnNGX_OK; | |
| } | |
| ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, |
| externngx_http_lua_event_actions_tngx_http_lua_epoll; | ||
| externngx_http_lua_event_actions_tngx_http_lua_poll; | ||
| externngx_http_lua_event_actions_tngx_http_lua_kqueue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| externngx_http_lua_event_actions_tngx_http_lua_epoll; | |
| externngx_http_lua_event_actions_tngx_http_lua_poll; | |
| externngx_http_lua_event_actions_tngx_http_lua_kqueue; | |
| #if (NGX_HAVE_EPOLL) | |
| externngx_http_lua_event_actions_tngx_http_lua_epoll; | |
| #endif | |
| #if (NGX_HAVE_POLL) | |
| externngx_http_lua_event_actions_tngx_http_lua_poll; | |
| #endif | |
| #if (NGX_HAVE_KQUEUE) | |
| externngx_http_lua_event_actions_tngx_http_lua_kqueue; | |
| #endif |
| ngx_http_lua_assert(lmcf->lua!=NULL); | ||
| if (!lmcf->requires_shm&&lmcf->init_handler){ | ||
| cycle=cf->cycle; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should move all these codes into init_handler
| | NGX_HTTP_LUA_CONTEXT_SSL_SESS_FETCH) | ||
| #defineNGX_HTTP_LUA_CONTEXT_BLOCKED_COSOCKET \ | ||
| (NGX_HTTP_LUA_CONTEXT_INIT \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need align
| === TEST 73: run in init_worker_by_lua |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| === TEST 73: run in init_worker_by_lua | |
| === TEST 73: run in init_by_lua |
| \z | ||
| [error] | ||
| --- timeout: 5 | ||
| --- ONLY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| --- ONLY | |
| --- ONLY |
| --- ONLY |
This pull request is now in conflict :( |
This pull request is now in conflict :( |
This pull request is now in conflict :( |
This pull request is now in conflict :( |
This pull request is now in conflict :( |
This pull request is now in conflict :( |
This pull request is now in conflict :( |
This pull request is now in conflict :( |
I hereby granted the copyright of the changes in this pull request
to the authors of this lua-nginx-module project.
Sometime we need use cosocket in
init_by_luato get some data from remote before NGINX init.This feature allow us use cosocket in some block phase, and we should limit its use way.