From 583f6ef30b7291cbe5596272a1eb4d838d30c2a8 Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Wed, 29 Jun 2016 14:30:00 +0300 Subject: [PATCH] Removed unused flag accept_context_updated from ngx_event_t. Also, removed practically unused flag accept_context_updated from ngx_connection_t. --- src/core/ngx_connection.h | 4 ---- src/event/ngx_event.h | 5 ----- src/event/ngx_event_acceptex.c | 4 ++-- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/core/ngx_connection.h b/src/core/ngx_connection.h index b11e92b2d..e484c81da 100644 --- a/src/core/ngx_connection.h +++ b/src/core/ngx_connection.h @@ -186,10 +186,6 @@ struct ngx_connection_s { unsigned need_last_buf:1; -#if (NGX_HAVE_IOCP) - unsigned accept_context_updated:1; -#endif - #if (NGX_HAVE_AIO_SENDFILE) unsigned busy_count:2; #endif diff --git a/src/event/ngx_event.h b/src/event/ngx_event.h index 1c7c14873..394a0e8e5 100644 --- a/src/event/ngx_event.h +++ b/src/event/ngx_event.h @@ -76,11 +76,6 @@ struct ngx_event_s { unsigned cancelable:1; -#if (NGX_WIN32) - /* setsockopt(SO_UPDATE_ACCEPT_CONTEXT) was successful */ - unsigned accept_context_updated:1; -#endif - #if (NGX_HAVE_KQUEUE) unsigned kq_vnode:1; diff --git a/src/event/ngx_event_acceptex.c b/src/event/ngx_event_acceptex.c index e414fe446..1999faf20 100644 --- a/src/event/ngx_event_acceptex.c +++ b/src/event/ngx_event_acceptex.c @@ -41,8 +41,8 @@ ngx_event_acceptex(ngx_event_t *rev) ngx_log_error(NGX_LOG_CRIT, c->log, ngx_socket_errno, "setsockopt(SO_UPDATE_ACCEPT_CONTEXT) failed for %V", &c->addr_text); - } else { - c->accept_context_updated = 1; + /* TODO: close socket */ + return; } ngx_getacceptexsockaddrs(c->buffer->pos,