comparison src/event/ngx_event.c @ 9060:91ad1abfb285 quic

Merged with the default branch.
author Sergey Kandaurov <pluknet@nginx.com>
date Thu, 15 Dec 2022 19:40:44 +0400
parents c2f5d79cde64 8852f39311de
children 35e27117b593
comparison
equal deleted inserted replaced
9059:b87a0dbc1150 9060:91ad1abfb285
432 static char * 432 static char *
433 ngx_event_init_conf(ngx_cycle_t *cycle, void *conf) 433 ngx_event_init_conf(ngx_cycle_t *cycle, void *conf)
434 { 434 {
435 #if (NGX_HAVE_REUSEPORT) 435 #if (NGX_HAVE_REUSEPORT)
436 ngx_uint_t i; 436 ngx_uint_t i;
437 ngx_core_conf_t *ccf;
437 ngx_listening_t *ls; 438 ngx_listening_t *ls;
438 #endif 439 #endif
439 440
440 if (ngx_get_conf(cycle->conf_ctx, ngx_events_module) == NULL) { 441 if (ngx_get_conf(cycle->conf_ctx, ngx_events_module) == NULL) {
441 ngx_log_error(NGX_LOG_EMERG, cycle->log, 0, 442 ngx_log_error(NGX_LOG_EMERG, cycle->log, 0,
458 return NGX_CONF_ERROR; 459 return NGX_CONF_ERROR;
459 } 460 }
460 461
461 #if (NGX_HAVE_REUSEPORT) 462 #if (NGX_HAVE_REUSEPORT)
462 463
463 if (!ngx_test_config) { 464 ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module);
465
466 if (!ngx_test_config && ccf->master) {
464 467
465 ls = cycle->listening.elts; 468 ls = cycle->listening.elts;
466 for (i = 0; i < cycle->listening.nelts; i++) { 469 for (i = 0; i < cycle->listening.nelts; i++) {
467 470
468 if (!ls[i].reuseport || ls[i].worker != 0) { 471 if (!ls[i].reuseport || ls[i].worker != 0) {
826 829
827 #if (NGX_HAVE_DEFERRED_ACCEPT) 830 #if (NGX_HAVE_DEFERRED_ACCEPT)
828 rev->deferred_accept = ls[i].deferred_accept; 831 rev->deferred_accept = ls[i].deferred_accept;
829 #endif 832 #endif
830 833
831 if (!(ngx_event_flags & NGX_USE_IOCP_EVENT)) { 834 if (!(ngx_event_flags & NGX_USE_IOCP_EVENT)
835 && cycle->old_cycle)
836 {
832 if (ls[i].previous) { 837 if (ls[i].previous) {
833 838
834 /* 839 /*
835 * delete the old accept events that were bound to 840 * delete the old accept events that were bound to
836 * the old cycle read events array 841 * the old cycle read events array