summaryrefslogtreecommitdiffhomepage
path: root/src/event
diff options
context:
space:
mode:
Diffstat (limited to 'src/event')
-rw-r--r--src/event/modules/ngx_select_module.c2
-rw-r--r--src/event/ngx_event.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/src/event/modules/ngx_select_module.c b/src/event/modules/ngx_select_module.c
index 39fb3f76f..93b3cf3e7 100644
--- a/src/event/modules/ngx_select_module.c
+++ b/src/event/modules/ngx_select_module.c
@@ -596,12 +596,14 @@ static char *ngx_select_init_conf(ngx_cycle_t *cycle, void *conf)
/* disable warning: the default FD_SETSIZE is 1024U in FreeBSD 5.x */
+#if !(WIN32)
if ((unsigned) ecf->connections > FD_SETSIZE) {
ngx_log_error(NGX_LOG_EMERG, cycle->log, 0,
"the maximum number of files "
"supported by select() is " ngx_value(FD_SETSIZE));
return NGX_CONF_ERROR;
}
+#endif
return NGX_CONF_OK;
}
diff --git a/src/event/ngx_event.c b/src/event/ngx_event.c
index a1153a6dd..d669182a0 100644
--- a/src/event/ngx_event.c
+++ b/src/event/ngx_event.c
@@ -658,8 +658,12 @@ static char *ngx_event_init_conf(ngx_cycle_t *cycle, void *conf)
#elif (HAVE_SELECT)
+#if (WIN32)
+ ngx_conf_init_unsigned_value(ecf->connections, DEFAULT_CONNECTIONS);
+#else
ngx_conf_init_unsigned_value(ecf->connections,
FD_SETSIZE < DEFAULT_CONNECTIONS ? FD_SETSIZE : DEFAULT_CONNECTIONS);
+#endif
ngx_conf_init_value(ecf->use, ngx_select_module.ctx_index);
ngx_conf_init_ptr_value(ecf->name, ngx_select_module_ctx.name->data);