merged shutdown delay fix from libtorrent_aio

This commit is contained in:
Arvid Norberg 2012-07-15 02:30:13 +00:00
parent 9f4697a11b
commit db33922684
1 changed files with 6 additions and 0 deletions

View File

@ -1763,6 +1763,12 @@ namespace aux {
TORRENT_ASSERT(!ec); TORRENT_ASSERT(!ec);
} }
m_listen_sockets.clear(); m_listen_sockets.clear();
if (m_socks_listen_socket && m_socks_listen_socket->is_open())
m_socks_listen_socket->close();
m_socks_listen_socket.reset();
if (m_i2p_listen_socket && m_i2p_listen_socket->is_open())
m_i2p_listen_socket->close();
m_i2p_listen_socket.reset();
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING) #if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
(*m_logger) << time_now_string() << " aborting all torrents (" << m_torrents.size() << ")\n"; (*m_logger) << time_now_string() << " aborting all torrents (" << m_torrents.size() << ")\n";