comparison src/event/modules/ngx_epoll_module.c @ 2062:90312b616162

prepare to allow various number of connections in child processes
author Igor Sysoev <igor@sysoev.ru>
date Mon, 23 Jun 2008 13:23:29 +0000
parents f69d1aab6a0f
children c7d57b539248
comparison
equal deleted inserted replaced
2061:b0a1c84725cf 2062:90312b616162
141 141
142 142
143 static ngx_int_t 143 static ngx_int_t
144 ngx_epoll_init(ngx_cycle_t *cycle, ngx_msec_t timer) 144 ngx_epoll_init(ngx_cycle_t *cycle, ngx_msec_t timer)
145 { 145 {
146 ngx_event_conf_t *ecf;
147 ngx_epoll_conf_t *epcf; 146 ngx_epoll_conf_t *epcf;
148 147
149 ecf = ngx_event_get_conf(cycle->conf_ctx, ngx_event_core_module);
150
151 epcf = ngx_event_get_conf(cycle->conf_ctx, ngx_epoll_module); 148 epcf = ngx_event_get_conf(cycle->conf_ctx, ngx_epoll_module);
152 149
153 if (ep == -1) { 150 if (ep == -1) {
154 ep = epoll_create(ecf->connections / 2); 151 ep = epoll_create(cycle->connection_n / 2);
155 152
156 if (ep == -1) { 153 if (ep == -1) {
157 ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno, 154 ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno,
158 "epoll_create() failed"); 155 "epoll_create() failed");
159 return NGX_ERROR; 156 return NGX_ERROR;