fix unloading of GeoIP database to not cause potential crashes while shutting down

This commit is contained in:
Arvid Norberg 2010-03-16 02:50:20 +00:00
parent fc224f29e4
commit edea865023
1 changed files with 2 additions and 0 deletions

View File

@ -3474,6 +3474,8 @@ namespace aux {
#ifndef TORRENT_DISABLE_GEO_IP
if (m_asnum_db) GeoIP_delete(m_asnum_db);
if (m_country_db) GeoIP_delete(m_country_db);
m_asnum_db = 0;
m_country_db = 0;
#endif
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
(*m_logger) << time_now_string() << " waiting for main thread\n";