aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_event.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2003-06-04 17:28:33 +0000
committerIgor Sysoev <igor@sysoev.ru>2003-06-04 17:28:33 +0000
commit9cf783074fd7793ebb6859e7f62b054d79074efe (patch)
treeb5bd9726d10952b0fab24754e2af210a9b644682 /src/http/ngx_http_event.c
parent1c10462e88491d52a23e22fbc3ca0012591df095 (diff)
downloadnginx-9cf783074fd7793ebb6859e7f62b054d79074efe.tar.gz
nginx-9cf783074fd7793ebb6859e7f62b054d79074efe.zip
nginx-0.0.1-2003-06-04-21:28:33 import
Diffstat (limited to 'src/http/ngx_http_event.c')
-rw-r--r--src/http/ngx_http_event.c10
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);
}