diff options
author | Igor Sysoev <igor@sysoev.ru> | 2004-01-05 20:55:48 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2004-01-05 20:55:48 +0000 |
commit | 3c3ca1735815a4e495922b50b01a258016c93d4b (patch) | |
tree | 55ab881e478c8ead90652850135d3f083a7e9772 /src/os/unix/ngx_freebsd_sendfile_chain.c | |
parent | fa5fea18f7b0f6d024d5a814d34c778b6792abdb (diff) | |
download | nginx-3c3ca1735815a4e495922b50b01a258016c93d4b.tar.gz nginx-3c3ca1735815a4e495922b50b01a258016c93d4b.zip |
nginx-0.0.1-2004-01-05-23:55:48 import
Diffstat (limited to 'src/os/unix/ngx_freebsd_sendfile_chain.c')
-rw-r--r-- | src/os/unix/ngx_freebsd_sendfile_chain.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/os/unix/ngx_freebsd_sendfile_chain.c b/src/os/unix/ngx_freebsd_sendfile_chain.c index 63c877f7d..16aa2ad01 100644 --- 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(ngx_connection_t *c, ngx_chain_t *in) 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(ngx_connection_t *c, ngx_chain_t *in) } 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(ngx_connection_t *c, ngx_chain_t *in) } 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; } } |