summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorRazvan Becheriu <razvan@isc.org>2019-07-04 04:04:30 +0200
committerRazvan Becheriu <razvan@isc.org>2019-07-04 18:40:27 +0200
commit5cbf42b12d047d07ca1fe717c6f86779416be5a2 (patch)
treea0cca73984e73484a388bfa64ea5869818827f8b /src/lib
parent[419-subnet-prefix-subnet-parameter-ambiguity] Added ChangeLog entry for subn... (diff)
downloadkea-5cbf42b12d047d07ca1fe717c6f86779416be5a2.tar.xz
kea-5cbf42b12d047d07ca1fe717c6f86779416be5a2.zip
[#639,!410] clear cache_ptr_ before unloading library
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/dhcpsrv/host_mgr.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/dhcpsrv/host_mgr.cc b/src/lib/dhcpsrv/host_mgr.cc
index 94859dfad3..4ed8b9ee23 100644
--- a/src/lib/dhcpsrv/host_mgr.cc
+++ b/src/lib/dhcpsrv/host_mgr.cc
@@ -48,6 +48,9 @@ HostMgr::addBackend(const std::string& access) {
bool
HostMgr::delBackend(const std::string& db_type) {
+ if (getHostMgrPtr()->cache_ptr_->getType() == db_type) {
+ getHostMgrPtr()->cache_ptr_.reset();
+ }
return (HostDataSourceFactory::del(getHostMgrPtr()->alternate_sources_, db_type));
}