diff src/http/ngx_http_event.c @ 101:2e069b6e6920

nginx-0.0.1-2003-06-04-21:28:33 import
author Igor Sysoev <igor@sysoev.ru>
date Wed, 04 Jun 2003 17:28:33 +0000
parents 7ebc8b7fb816
children 6dfda4cf5200
line wrap: on
line diff
--- 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_h
 
     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);
     }