From db33922684c1c7d9c9ca99863da16aeff1781340 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 15 Jul 2012 02:30:13 +0000 Subject: [PATCH] merged shutdown delay fix from libtorrent_aio --- src/session_impl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/session_impl.cpp b/src/session_impl.cpp index c9801246f..ac9ccc5d8 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -1763,6 +1763,12 @@ namespace aux { TORRENT_ASSERT(!ec); } 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) (*m_logger) << time_now_string() << " aborting all torrents (" << m_torrents.size() << ")\n";