[nginx] Fixed unexpected ngx_socket_errno usage.
Maxim Dounin
mdounin at mdounin.ru
Wed Jan 7 15:38:30 UTC 2026
details: http://freenginx.org/hg/nginx/rev/a1141ed0eb84
branches:
changeset: 9455:a1141ed0eb84
user: Maxim Dounin <mdounin at mdounin.ru>
date: Wed Jan 07 18:22:53 2026 +0300
description:
Fixed unexpected ngx_socket_errno usage.
The particular error is reported because the protocol family of an
inherited socket is not supported, and not because of a syscall error,
so ngx_socket_errno contains unrelated data and should not be used.
diffstat:
src/core/ngx_connection.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 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
@@ -197,7 +197,7 @@ ngx_set_inherited_sockets(ngx_cycle_t *c
break;
default:
- ngx_log_error(NGX_LOG_CRIT, cycle->log, ngx_socket_errno,
+ ngx_log_error(NGX_LOG_CRIT, cycle->log, 0,
"the inherited socket #%d has "
"an unsupported protocol family", ls[i].fd);
ls[i].ignore = 1;
More information about the nginx-devel
mailing list