Delaying this destruction until the next peerDigestCheck() event results
in accumulation of PeerDigests (and related objects) during frequent
reconfigurations.
#include "neighbors.h"
#include "NeighborTypeDomainList.h"
#include "pconn.h"
+#include "PeerDigest.h"
#include "PeerPoolMgr.h"
#include "SquidConfig.h"
#include "util.h"
aclDestroyAccessList(&access);
#if USE_CACHE_DIGESTS
- cbdataReferenceDone(digest);
+ void *digestTmp = nullptr;
+ if (cbdataReferenceValidDone(digest, &digestTmp))
+ peerDigestNotePeerGone(static_cast<PeerDigest *>(digestTmp));
xfree(digest_url);
#endif
PeerDigest::~PeerDigest()
{
+ if (times.next_check && eventFind(peerDigestCheck, this))
+ eventDelete(peerDigestCheck, this);
delete cd;
// req_result pointer is not owned by us
}