aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_send.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/unix/ngx_send.c')
-rw-r--r--src/os/unix/ngx_send.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/os/unix/ngx_send.c b/src/os/unix/ngx_send.c
index 167f2eca3..0c3f959da 100644
--- a/src/os/unix/ngx_send.c
+++ b/src/os/unix/ngx_send.c
@@ -19,7 +19,11 @@ 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) {
+ if ((ngx_event_flags & NGX_USE_KQUEUE_EVENT)
+ && wev->pending_eof
+ /* FreeBSD 5.x-6.x may erroneously report ETIMEDOUT */
+ && wev->kq_errno != NGX_ETIMEDOUT)
+ {
(void) ngx_connection_error(c, wev->kq_errno,
"kevent() reported about an closed connection");
wev->error = 1;