security: Clean up ValidatorConfig when it is re-loaded.
Refs: #1492
Change-Id: I203a57c0cf18c3c5993abfa9c3c7ca9decbed6c2
diff --git a/src/security/validator-config.cpp b/src/security/validator-config.cpp
index aa8ec27..054c843 100644
--- a/src/security/validator-config.cpp
+++ b/src/security/validator-config.cpp
@@ -32,7 +32,7 @@
, m_certificateCache(certificateCache)
{
if (!static_cast<bool>(m_certificateCache))
- m_certificateCache = make_shared<CertificateCacheTtl>(m_face.ioService());
+ m_certificateCache = make_shared<CertificateCacheTtl>(boost::ref(m_face.getIoService()));
}
void
@@ -84,6 +84,8 @@
{
BOOST_ASSERT(!filename.empty());
+ reset();
+
if (configSection.begin() == configSection.end())
{
std::string msg = "Error processing configuration file";