[nginx] svn commit: r4349 - in branches/stable-1.0: . src/http

mdounin at mdounin.ru mdounin at mdounin.ru
Tue Dec 13 18:30:15 UTC 2011


Author: mdounin
Date: 2011-12-13 18:30:15 +0000 (Tue, 13 Dec 2011)
New Revision: 4349

Log:
Merge of r4144:

Upstream: clearing of u->peer.connection on close.

This fixes crashes observed with some 3rd party balancer modules.  Standard
balancer modules (round-robin and ip hash) explicitly set pc->connection
(aka u->peer.connection) to NULL and aren't affected.


Modified:
   branches/stable-1.0/
   branches/stable-1.0/src/http/ngx_http_upstream.c


Property changes on: branches/stable-1.0
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk:3960-3974,3977-3987,3991-3996,3998,4000-4018,4020,4023,4025-4027,4034-4065,4073,4077,4086-4090,4094-4102,4106-4108,4113-4114,4129-4137,4143,4147-4152,4154-4158,4177,4179,4182-4184,4186-4187,4189-4205,4207,4209-4210,4212,4219-4220,4229-4230,4232,4235-4237,4265,4268,4280,4283,4321,4342-4343
   + /trunk:3960-3974,3977-3987,3991-3996,3998,4000-4018,4020,4023,4025-4027,4034-4065,4073,4077,4086-4090,4094-4102,4106-4108,4113-4114,4129-4137,4143-4144,4147-4152,4154-4158,4177,4179,4182-4184,4186-4187,4189-4205,4207,4209-4210,4212,4219-4220,4229-4230,4232,4235-4237,4265,4268,4280,4283,4321,4342-4343

Modified: branches/stable-1.0/src/http/ngx_http_upstream.c
===================================================================
--- branches/stable-1.0/src/http/ngx_http_upstream.c	2011-12-13 18:07:52 UTC (rev 4348)
+++ branches/stable-1.0/src/http/ngx_http_upstream.c	2011-12-13 18:30:15 UTC (rev 4349)
@@ -2888,6 +2888,7 @@
 #endif
 
         ngx_close_connection(u->peer.connection);
+        u->peer.connection = NULL;
     }
 
 #if 0



More information about the nginx-devel mailing list