diff options
Diffstat (limited to 'src/http/ngx_http_event.c')
-rw-r--r-- | src/http/ngx_http_event.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/http/ngx_http_event.c b/src/http/ngx_http_event.c index b4a9ae97d..be6d3910a 100644 --- a/src/http/ngx_http_event.c +++ b/src/http/ngx_http_event.c @@ -1133,6 +1133,16 @@ static void ngx_http_set_keepalive(ngx_http_request_t *r) ctx->action = "keepalive"; + if (c->tcp_nopush) { + if (ngx_tcp_push(c->fd) == NGX_ERROR) { + ngx_log_error(NGX_LOG_CRIT, c->log, ngx_socket_errno, + ngx_tcp_push_n " failed"); + ngx_http_close_connection(c); + return; + } + c->tcp_nopush = 0; + } + if ((ngx_event_flags & NGX_HAVE_AIO_EVENT) || blocked) { ngx_http_keepalive_handler(rev); } |