Contributing Changes

张成龙 dongbeiouba at gmail.com
Tue Dec 29 09:30:14 UTC 2020


# HG changeset patch
# User Chenglong Zhang <dongbeiouba at gmail.com>
# Date 1609232548 -28800
#      Tue Dec 29 17:02:28 2020 +0800
# Node ID 65bb4c9c296d2c424286e2b36db96a4ba768369e
# Parent  82228f955153527fba12211f52bf102c90f38dfb
Clear connection pointer just after close it.

        ngx_close_connection(u->peer.connection);
        u->peer.connection = NULL;

diff -r 82228f955153 -r 65bb4c9c296d src/http/ngx_http_upstream.c
--- a/src/http/ngx_http_upstream.c Tue Dec 15 17:41:39 2020 +0300
+++ b/src/http/ngx_http_upstream.c Tue Dec 29 17:02:28 2020 +0800
@@ -4402,9 +4402,8 @@
         }

         ngx_close_connection(u->peer.connection);
-    }
-
-    u->peer.connection = NULL;
+        u->peer.connection = NULL;
+    }

     if (u->pipe && u->pipe->temp_file) {
         ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20201229/30ba38ca/attachment.htm>


More information about the nginx-devel mailing list