]> git.kaiwu.me - nginx.git/commitdiff
connection error should be logged with "connecting to upstream" action,
authorIgor Sysoev <igor@sysoev.ru>
Sun, 9 Sep 2007 18:43:16 +0000 (18:43 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Sun, 9 Sep 2007 18:43:16 +0000 (18:43 +0000)
the bug was introduced in r1154

src/http/ngx_http_upstream.c

index 650c84c6ee8cb457deaae0503aebbfd9ae0a5220..ae5f3d3e851ce63d8a35ab6838a46f92b127eb36 100644 (file)
@@ -1290,6 +1290,7 @@ ngx_http_upstream_test_connect(ngx_connection_t *c)
 
     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_connection_t *c)
         }
 
         if (err) {
+            c->log->action = "connecting to upstream";
             (void) ngx_connection_error(c, err, "connect() failed");
             return NGX_ERROR;
         }