[nginx] Adjusted ENOBUFS logging level.
Maxim Dounin
mdounin at mdounin.ru
Wed Mar 13 15:52:32 UTC 2024
details: http://freenginx.org/hg/nginx/rev/37ef53ecd6b0
branches:
changeset: 9227:37ef53ecd6b0
user: Maxim Dounin <mdounin at mdounin.ru>
date: Fri Mar 01 05:42:22 2024 +0300
description:
Adjusted ENOBUFS logging level.
On local datagram sockets ENOBUFS might legitimately appear due to
insufficient space in socket buffers, as seen on BSD systems.
Accordingly, ngx_connection_error() now logs it with logging level
set for the particular connection errors, either "info" or "error"
(instead of "alert", which was previously used).
diffstat:
src/core/ngx_connection.c | 3 ++-
src/os/unix/ngx_errno.h | 1 +
src/os/win32/ngx_errno.h | 1 +
3 files changed, 4 insertions(+), 1 deletions(-)
diffs (35 lines):
diff --git a/src/core/ngx_connection.c b/src/core/ngx_connection.c
--- a/src/core/ngx_connection.c
+++ b/src/core/ngx_connection.c
@@ -1600,7 +1600,8 @@ ngx_connection_error(ngx_connection_t *c
|| err == NGX_ENETDOWN
|| err == NGX_ENETUNREACH
|| err == NGX_EHOSTDOWN
- || err == NGX_EHOSTUNREACH)
+ || err == NGX_EHOSTUNREACH
+ || err == NGX_ENOBUFS)
{
switch (c->log_error) {
diff --git a/src/os/unix/ngx_errno.h b/src/os/unix/ngx_errno.h
--- a/src/os/unix/ngx_errno.h
+++ b/src/os/unix/ngx_errno.h
@@ -55,6 +55,7 @@ typedef int ngx_err_t;
#define NGX_ELOOP ELOOP
#define NGX_EBADF EBADF
#define NGX_EMSGSIZE EMSGSIZE
+#define NGX_ENOBUFS ENOBUFS
#if (NGX_HAVE_OPENAT)
#define NGX_EMLINK EMLINK
diff --git a/src/os/win32/ngx_errno.h b/src/os/win32/ngx_errno.h
--- a/src/os/win32/ngx_errno.h
+++ b/src/os/win32/ngx_errno.h
@@ -58,6 +58,7 @@ typedef DWORD ngx_e
#define NGX_ELOOP 0
#define NGX_EBADF WSAEBADF
#define NGX_EMSGSIZE WSAEMSGSIZE
+#define NGX_ENOBUFS WSAENOBUFS
#define NGX_EALREADY WSAEALREADY
#define NGX_EINVAL WSAEINVAL
More information about the nginx-devel
mailing list