aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/ngx_connection.c8
-rw-r--r--src/http/ngx_http_request.c23
2 files changed, 7 insertions, 24 deletions
diff --git a/src/core/ngx_connection.c b/src/core/ngx_connection.c
index 08a547d42..21e986c71 100644
--- a/src/core/ngx_connection.c
+++ b/src/core/ngx_connection.c
@@ -701,7 +701,13 @@ ngx_configure_listening_sockets(ngx_cycle_t *cycle)
if (ls[i].add_deferred || ls[i].delete_deferred) {
if (ls[i].add_deferred) {
- value = (int) (ls[i].post_accept_timeout / 1000);
+ /*
+ * There is no way to find out how long a connection was
+ * in queue (and a connection may bypass deferred queue at all
+ * if syncookies were used), hence we use 1 second timeout
+ * here.
+ */
+ value = 1;
} else {
value = 0;
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index 1f6d246bc..badb804a1 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -423,20 +423,6 @@ ngx_http_wait_request_handler(ngx_event_t *rev)
if (n == NGX_AGAIN) {
-#if (NGX_HAVE_DEFERRED_ACCEPT && defined TCP_DEFER_ACCEPT)
- if (c->listening->deferred_accept
-#if (NGX_HTTP_SSL)
- && c->ssl == NULL
-#endif
- )
- {
- ngx_log_error(NGX_LOG_INFO, c->log, NGX_ETIMEDOUT,
- "client timed out in deferred accept");
- ngx_http_close_connection(c);
- return;
- }
-#endif
-
if (!rev->timer_set) {
ngx_add_timer(rev, c->listening->post_accept_timeout);
ngx_reusable_connection(c, 1);
@@ -636,15 +622,6 @@ ngx_http_ssl_handshake(ngx_event_t *rev)
if (n == -1) {
if (err == NGX_EAGAIN) {
-#if (NGX_HAVE_DEFERRED_ACCEPT && defined TCP_DEFER_ACCEPT)
- if (c->listening->deferred_accept) {
- ngx_log_error(NGX_LOG_INFO, c->log, NGX_ETIMEDOUT,
- "client timed out in deferred accept");
- ngx_http_close_connection(c);
- return;
- }
-#endif
-
if (!rev->timer_set) {
ngx_add_timer(rev, c->listening->post_accept_timeout);
ngx_reusable_connection(c, 1);