Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-01-05 23:55:48 +0300
committerIgor Sysoev <igor@sysoev.ru>2004-01-05 23:55:48 +0300
commit3c3ca1735815a4e495922b50b01a258016c93d4b (patch)
tree55ab881e478c8ead90652850135d3f083a7e9772 /src/os/unix/ngx_freebsd_sendfile_chain.c
parentfa5fea18f7b0f6d024d5a814d34c778b6792abdb (diff)
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.c9
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;
}
}