------------------------------------------------------------ revno: 13566 revision-id: chtsanti@users.sourceforge.net-20140829065917-0t7ev216qbb8qlpv parent: squidadm@squid-cache.org-20140829001434-0l2frvlx1zf6kyem committer: Christos Tsantilas branch nick: trunk timestamp: Fri 2014-08-29 09:59:17 +0300 message: Close active pconns after their *_port goes away on reconfigure. This change reduces what may be perceived as reconfigure memory leaks related to *_port options. Before this change, a single persistent connection could continue to receive new requests (and tie no longer globally accessible PortCfg-related structures) for hours. TODO: Close already idle pconns as well. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: chtsanti@users.sourceforge.net-20140829065917-\ # 0t7ev216qbb8qlpv # target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: 76a2830f5f682f9e55e000bc33d4912238db550b # timestamp: 2014-08-29 07:54:02 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # base_revision_id: squidadm@squid-cache.org-20140829001434-\ # 0l2frvlx1zf6kyem # # Begin patch === modified file 'src/client_side_reply.cc' --- src/client_side_reply.cc 2014-08-23 10:39:15 +0000 +++ src/client_side_reply.cc 2014-08-29 06:59:17 +0000 @@ -1519,6 +1519,10 @@ // The peer wants to close the pinned connection debugs(88, 3, "pinned reply forces close"); request->flags.proxyKeepalive = false; + } else if (http->getConn() && http->getConn()->port->listenConn == NULL) { + // The listening port closed because of a reconfigure + debugs(88, 3, "listening port closed"); + request->flags.proxyKeepalive = false; } // Decide if we send chunked reply