From b0bb1c9f6fe6e1e963b74d9fc644b0ccf4f57c32 Mon Sep 17 00:00:00 2001 From: Christos Tsantilas Date: Wed, 2 Mar 2016 11:12:10 +0200 Subject: [PATCH] Squid crashes on shutdown while cleaning up idle ICAP connections. 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 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.cc b/src/main.cc index 5126c5425c..155e475a41 100644 --- a/src/main.cc +++ b/src/main.cc @@ -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 */ -- 2.47.2