aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_variables.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/ngx_http_variables.c')
-rw-r--r--src/http/ngx_http_variables.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/http/ngx_http_variables.c b/src/http/ngx_http_variables.c
index ecf20c372..120145829 100644
--- a/src/http/ngx_http_variables.c
+++ b/src/http/ngx_http_variables.c
@@ -749,8 +749,7 @@ ngx_http_variable_server_addr(ngx_http_request_t *r,
if (r->in_addr == 0) {
len = sizeof(struct sockaddr_in);
if (getsockname(c->fd, (struct sockaddr *) &sin, &len) == -1) {
- ngx_log_error(NGX_LOG_CRIT, c->log,
- ngx_socket_errno, "getsockname() failed");
+ ngx_connection_error(c, ngx_socket_errno, "getsockname() failed");
return NGX_ERROR;
}