Browse Source

Unload the GeoIP db when disabled.

adaptive-webui-19844
sledgehammer999 9 years ago
parent
commit
f7c8a499d5
  1. 7
      src/core/net/geoipmanager.cpp

7
src/core/net/geoipmanager.cpp

@ -403,8 +403,13 @@ void GeoIPManager::configure() @@ -403,8 +403,13 @@ void GeoIPManager::configure()
const bool enabled = Preferences::instance()->resolvePeerCountries();
if (m_enabled != enabled) {
m_enabled = enabled;
if (m_enabled && !m_geoIPDatabase)
if (m_enabled && !m_geoIPDatabase) {
loadDatabase();
}
else if (!m_enabled && m_geoIPDatabase) {
delete m_geoIPDatabase;
m_geoIPDatabase = 0;
}
}
}

Loading…
Cancel
Save