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

src/http/ngx_http_upstream.c

index 7986f0fdffa166a4690573c0c641505ecaaa19f3..919dc5903450a8cf0eb6c2101d7bee186734eec6 100644 (file)
@@ -1288,6 +1288,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;
@@ -1311,6 +1312,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;
         }