changeset 1469:0a269c464eaf

connection error should be logged with "connecting to upstream" action, the bug was introduced in r1154
author Igor Sysoev <igor@sysoev.ru>
date Sun, 09 Sep 2007 18:43:16 +0000
parents 491e5059ea19
children 92b5f20d54f4
files src/http/ngx_http_upstream.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -1290,6 +1290,7 @@ ngx_http_upstream_test_connect(ngx_conne
 
     if (ngx_event_flags & NGX_USE_KQUEUE_EVENT)  {
         if (c->write->pending_eof) {
+            c->log->action = "connecting to upstream";
             (void) ngx_connection_error(c, c->write->kq_errno,
                                     "kevent() reported that connect() failed");
             return NGX_ERROR;
@@ -1313,6 +1314,7 @@ ngx_http_upstream_test_connect(ngx_conne
         }
 
         if (err) {
+            c->log->action = "connecting to upstream";
             (void) ngx_connection_error(c, err, "connect() failed");
             return NGX_ERROR;
         }