]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Squid crashes on shutdown while cleaning up idle ICAP connections.
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Thu, 3 Mar 2016 00:49:45 +0000 (13:49 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 3 Mar 2016 00:49:45 +0000 (13:49 +1300)
The global Adaptation::Icap::TheConfig object is automatically
destroyed when Squid exits. Its destructor destroys Icap::ServiceRep
objects that, in turn, close all open connections in the idle
connections pool. Since this happens after comm_exit has destroyed all
Comm structures associated with those connections, Squid crases.

This is a Measurement Factory project.

src/main.cc

index 88e83d382e3986381e30b29fb8a3908aacb6a955..91284ce296ff2591a0f7d4b1b46e29fa296be714 100644 (file)
@@ -2036,6 +2036,9 @@ SquidShutdown()
 
     WIN32_svcstatusupdate(SERVICE_STOP_PENDING, 10000);
 #endif
+#if ICAP_CLIENT
+    Adaptation::Icap::TheConfig.freeService();
+#endif
 
     Store::Root().sync(); /* Flush pending object writes/unlinks */