aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/unix')
-rw-r--r--src/os/unix/ngx_freebsd_sendfile_chain.c11
-rw-r--r--src/os/unix/ngx_recv.c12
-rw-r--r--src/os/unix/ngx_send.c7
-rw-r--r--src/os/unix/ngx_writev_chain.c7
4 files changed, 13 insertions, 24 deletions
diff --git a/src/os/unix/ngx_freebsd_sendfile_chain.c b/src/os/unix/ngx_freebsd_sendfile_chain.c
index a29aaf3c9..7ae594897 100644
--- a/src/os/unix/ngx_freebsd_sendfile_chain.c
+++ b/src/os/unix/ngx_freebsd_sendfile_chain.c
@@ -57,9 +57,8 @@ ngx_freebsd_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
#if (NGX_HAVE_KQUEUE)
if ((ngx_event_flags & NGX_USE_KQUEUE_EVENT) && wev->pending_eof) {
- ngx_log_error(NGX_LOG_INFO, c->log, wev->kq_errno,
- "kevent() reported about an closed connection");
-
+ (void) ngx_connection_error(c, wev->kq_errno,
+ "kevent() reported about an closed connection");
wev->error = 1;
return NGX_CHAIN_ERROR;
}
@@ -228,8 +227,8 @@ ngx_freebsd_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
if (err != NGX_EINTR) {
wev->error = 1;
- ngx_connection_error(c, err,
- ngx_tcp_nopush_n " failed");
+ (void) ngx_connection_error(c, err,
+ ngx_tcp_nopush_n " failed");
return NGX_CHAIN_ERROR;
}
@@ -276,7 +275,7 @@ ngx_freebsd_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
} else {
wev->error = 1;
- ngx_connection_error(c, err, "sendfile() failed");
+ (void) ngx_connection_error(c, err, "sendfile() failed");
return NGX_CHAIN_ERROR;
}
}
diff --git a/src/os/unix/ngx_recv.c b/src/os/unix/ngx_recv.c
index 369be661a..e96ca7898 100644
--- a/src/os/unix/ngx_recv.c
+++ b/src/os/unix/ngx_recv.c
@@ -29,20 +29,12 @@ ssize_t ngx_unix_recv(ngx_connection_t *c, u_char *buf, size_t size)
rev->ready = 0;
rev->eof = 1;
- ngx_log_error(NGX_LOG_INFO, c->log, rev->kq_errno,
- "kevent() reported about an closed connection");
-
if (rev->kq_errno) {
rev->error = 1;
ngx_set_socket_errno(rev->kq_errno);
- if (rev->kq_errno == NGX_ECONNRESET
- && c->log_error == NGX_ERROR_IGNORE_ECONNRESET)
- {
- return 0;
- }
-
- return NGX_ERROR;
+ return ngx_connection_error(c, rev->kq_errno,
+ "kevent() reported about an closed connection");
}
return 0;
diff --git a/src/os/unix/ngx_send.c b/src/os/unix/ngx_send.c
index ffe6bcba2..167f2eca3 100644
--- a/src/os/unix/ngx_send.c
+++ b/src/os/unix/ngx_send.c
@@ -20,9 +20,8 @@ ssize_t ngx_unix_send(ngx_connection_t *c, u_char *buf, size_t size)
#if (NGX_HAVE_KQUEUE)
if ((ngx_event_flags & NGX_USE_KQUEUE_EVENT) && wev->pending_eof) {
- ngx_log_error(NGX_LOG_INFO, c->log, wev->kq_errno,
- "kevent() reported about an closed connection");
-
+ (void) ngx_connection_error(c, wev->kq_errno,
+ "kevent() reported about an closed connection");
wev->error = 1;
return NGX_ERROR;
}
@@ -63,7 +62,7 @@ ssize_t ngx_unix_send(ngx_connection_t *c, u_char *buf, size_t size)
} else {
wev->error = 1;
- ngx_connection_error(c, err, "send() failed");
+ (void) ngx_connection_error(c, err, "send() failed");
return NGX_ERROR;
}
}
diff --git a/src/os/unix/ngx_writev_chain.c b/src/os/unix/ngx_writev_chain.c
index ed3ad7158..6d516ac69 100644
--- a/src/os/unix/ngx_writev_chain.c
+++ b/src/os/unix/ngx_writev_chain.c
@@ -34,9 +34,8 @@ ngx_writev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
#if (NGX_HAVE_KQUEUE)
if ((ngx_event_flags & NGX_USE_KQUEUE_EVENT) && wev->pending_eof) {
- ngx_log_error(NGX_LOG_INFO, c->log, wev->kq_errno,
- "kevent() reported about an closed connection");
-
+ (void) ngx_connection_error(c, wev->kq_errno,
+ "kevent() reported about an closed connection");
wev->error = 1;
return NGX_CHAIN_ERROR;
}
@@ -117,7 +116,7 @@ ngx_writev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
} else {
wev->error = 1;
- ngx_connection_error(c, err, "writev() failed");
+ (void) ngx_connection_error(c, err, "writev() failed");
return NGX_CHAIN_ERROR;
}
}