diff src/os/unix/ngx_freebsd_sendfile_chain.c @ 218:05592fd7a436

nginx-0.0.1-2004-01-05-23:55:48 import
author Igor Sysoev <igor@sysoev.ru>
date Mon, 05 Jan 2004 20:55:48 +0000
parents f1d0e5f09c1e
children b6793bc5034b
line wrap: on
line diff
--- a/src/os/unix/ngx_freebsd_sendfile_chain.c
+++ b/src/os/unix/ngx_freebsd_sendfile_chain.c
@@ -151,7 +151,7 @@ ngx_chain_t *ngx_freebsd_sendfile_chain(
 
         if (file) {
 
-            if (ngx_freebsd_use_tcp_nopush && !c->tcp_nopush) {
+            if (ngx_freebsd_use_tcp_nopush && c->tcp_nopush == 0) {
                 c->tcp_nopush = 1;
 
                 ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, 0, "tcp_nopush");
@@ -191,7 +191,7 @@ ngx_chain_t *ngx_freebsd_sendfile_chain(
                 } else if (err == NGX_EAGAIN) {
                     eagain = 1;
 
-                } else if (err == NGX_EPIPE) {
+                } else if (err == NGX_EPIPE || err == NGX_ENOTCONN) {
                     level = NGX_LOG_INFO;
                 }
 
@@ -202,8 +202,13 @@ ngx_chain_t *ngx_freebsd_sendfile_chain(
 
                 } else {
                     wev->error = 1;
+#if 0
                     ngx_log_error(level, c->log, err,
                                   "sendfile() failed");
+#else
+                    ngx_log_error(level, c->log, err,
+                                  "sendfile(#%d) failed", c->fd);
+#endif
                     return NGX_CHAIN_ERROR;
                 }
             }