mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 17:52:38 +08:00
connection error should be logged with "connecting to upstream" action,
the bug was introduced in r1154
This commit is contained in:
parent
3dea919675
commit
9e4b7276f9
@ -1290,6 +1290,7 @@ ngx_http_upstream_test_connect(ngx_connection_t *c)
|
|||||||
|
|
||||||
if (ngx_event_flags & NGX_USE_KQUEUE_EVENT) {
|
if (ngx_event_flags & NGX_USE_KQUEUE_EVENT) {
|
||||||
if (c->write->pending_eof) {
|
if (c->write->pending_eof) {
|
||||||
|
c->log->action = "connecting to upstream";
|
||||||
(void) ngx_connection_error(c, c->write->kq_errno,
|
(void) ngx_connection_error(c, c->write->kq_errno,
|
||||||
"kevent() reported that connect() failed");
|
"kevent() reported that connect() failed");
|
||||||
return NGX_ERROR;
|
return NGX_ERROR;
|
||||||
@ -1313,6 +1314,7 @@ ngx_http_upstream_test_connect(ngx_connection_t *c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
|
c->log->action = "connecting to upstream";
|
||||||
(void) ngx_connection_error(c, err, "connect() failed");
|
(void) ngx_connection_error(c, err, "connect() failed");
|
||||||
return NGX_ERROR;
|
return NGX_ERROR;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user