fix issue where shutting down the session immediately and asynchronously starting the DHT would cause a shutdown hang (#1203)
This commit is contained in:
parent
6bb2d7c017
commit
c966435d1c
|
@ -5805,6 +5805,8 @@ retry:
|
|||
// postpone starting the DHT if we're still resolving the DHT router
|
||||
if (m_outstanding_router_lookups > 0) return;
|
||||
|
||||
if (m_abort) return;
|
||||
|
||||
m_dht = boost::make_shared<dht::dht_tracker>(static_cast<dht_observer*>(this)
|
||||
, boost::ref(m_udp_socket), boost::cref(m_dht_settings)
|
||||
, boost::ref(m_stats_counters)
|
||||
|
|
|
@ -256,5 +256,11 @@ TORRENT_TEST(save_restore_state_load_filter)
|
|||
});
|
||||
}
|
||||
|
||||
TORRENT_TEST(session_shutdown)
|
||||
{
|
||||
lt::settings_pack pack;
|
||||
lt::session ses(pack);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue