mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-27 11:49:01 +03:00
Unload the GeoIP db when disabled.
This commit is contained in:
parent
ad7ad8f596
commit
f7c8a499d5
1 changed files with 6 additions and 1 deletions
|
@ -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…
Reference in a new issue