mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-21 08:09:35 +08:00
Unload the GeoIP db when disabled.
This commit is contained in:
parent
ad7ad8f596
commit
f7c8a499d5
@ -403,8 +403,13 @@ void GeoIPManager::configure()
|
|||||||
const bool enabled = Preferences::instance()->resolvePeerCountries();
|
const bool enabled = Preferences::instance()->resolvePeerCountries();
|
||||||
if (m_enabled != enabled) {
|
if (m_enabled != enabled) {
|
||||||
m_enabled = enabled;
|
m_enabled = enabled;
|
||||||
if (m_enabled && !m_geoIPDatabase)
|
if (m_enabled && !m_geoIPDatabase) {
|
||||||
loadDatabase();
|
loadDatabase();
|
||||||
|
}
|
||||||
|
else if (!m_enabled && m_geoIPDatabase) {
|
||||||
|
delete m_geoIPDatabase;
|
||||||
|
m_geoIPDatabase = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user