diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2008-06-23 13:23:29 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2008-06-23 13:23:29 +0000 |
| commit | ce1e64f404db86230f8c55cac7d9a9b72d9858a0 (patch) | |
| tree | 13312eec120917f928f37530c57c4689229a27ee /src/event/modules | |
| parent | f2a1484347ce9bf6b8e71d4c91bcab4187e57556 (diff) | |
| download | nginx-ce1e64f404db86230f8c55cac7d9a9b72d9858a0.tar.gz nginx-ce1e64f404db86230f8c55cac7d9a9b72d9858a0.tar.bz2 | |
prepare to allow various number of connections in child processes
Diffstat (limited to 'src/event/modules')
| -rw-r--r-- | src/event/modules/ngx_epoll_module.c | 5 | ||||
| -rw-r--r-- | src/event/modules/ngx_select_module.c | 4 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/event/modules/ngx_epoll_module.c b/src/event/modules/ngx_epoll_module.c index 432164bc4..71d847107 100644 --- a/src/event/modules/ngx_epoll_module.c +++ b/src/event/modules/ngx_epoll_module.c @@ -143,15 +143,12 @@ ngx_module_t ngx_epoll_module = { static ngx_int_t ngx_epoll_init(ngx_cycle_t *cycle, ngx_msec_t timer) { - ngx_event_conf_t *ecf; ngx_epoll_conf_t *epcf; - ecf = ngx_event_get_conf(cycle->conf_ctx, ngx_event_core_module); - epcf = ngx_event_get_conf(cycle->conf_ctx, ngx_epoll_module); if (ep == -1) { - ep = epoll_create(ecf->connections / 2); + ep = epoll_create(cycle->connection_n / 2); if (ep == -1) { ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno, diff --git a/src/event/modules/ngx_select_module.c b/src/event/modules/ngx_select_module.c index 19215a79c..a50088ba4 100644 --- a/src/event/modules/ngx_select_module.c +++ b/src/event/modules/ngx_select_module.c @@ -436,10 +436,10 @@ ngx_select_init_conf(ngx_cycle_t *cycle, void *conf) #if !(NGX_WIN32) - if ((unsigned) ecf->connections > FD_SETSIZE) { + if (cycle->connection_n > FD_SETSIZE) { ngx_log_error(NGX_LOG_EMERG, cycle->log, 0, "the maximum number of files " - "supported by select() is " ngx_value(FD_SETSIZE)); + "supported by select() is %ud", FD_SETSIZE); return NGX_CONF_ERROR; } |
