]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Squid crashes on shutdown while cleaning up idle ICAP connections.
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Wed, 2 Mar 2016 09:12:10 +0000 (11:12 +0200)
committerChristos Tsantilas <chtsanti@users.sourceforge.net>
Wed, 2 Mar 2016 09:12:10 +0000 (11:12 +0200)
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 5126c5425c398e7889686b73da54c2d643153ce6..155e475a41085d087f679d431a415d517c4fe583 100644 (file)
@@ -1899,6 +1899,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 */