merged uTP fix from RC_0_16

This commit is contained in:
Arvid Norberg 2012-10-15 06:20:42 +00:00
parent 7974e50bb8
commit e4f15a2223
1 changed files with 14 additions and 0 deletions

View File

@ -2201,11 +2201,19 @@ namespace aux {
{
TORRENT_ASSERT(is_network_thread());
TORRENT_ASSERT(!m_abort);
retry:
// close the open listen sockets
// close the listen sockets
for (std::list<listen_socket_t>::iterator i = m_listen_sockets.begin()
, end(m_listen_sockets.end()); i != end; ++i)
i->sock->close(ec);
m_listen_sockets.clear();
m_incoming_connection = false;
ec.clear();
if (m_abort) return;
m_ipv6_interface = tcp::endpoint();
m_ipv4_interface = tcp::endpoint();
@ -2231,6 +2239,7 @@ retry:
// sockets can be bound to the same one
m_listen_interface.port(s.external_port);
TORRENT_ASSERT(!m_abort);
m_listen_sockets.push_back(s);
async_accept(s.sock, s.ssl);
}
@ -2245,6 +2254,7 @@ retry:
if (s.sock)
{
TORRENT_ASSERT(!m_abort);
m_listen_sockets.push_back(s);
async_accept(s.sock, s.ssl);
}
@ -2260,6 +2270,7 @@ retry:
if (s.sock)
{
TORRENT_ASSERT(!m_abort);
m_listen_sockets.push_back(s);
async_accept(s.sock, s.ssl);
}
@ -2275,6 +2286,7 @@ retry:
if (s.sock)
{
TORRENT_ASSERT(!m_abort);
m_listen_sockets.push_back(s);
async_accept(s.sock, s.ssl);
}
@ -2306,6 +2318,7 @@ retry:
if (s.sock)
{
TORRENT_ASSERT(!m_abort);
m_listen_sockets.push_back(s);
async_accept(s.sock, s.ssl);
@ -2325,6 +2338,7 @@ retry:
if (s.sock)
{
TORRENT_ASSERT(!m_abort);
m_listen_sockets.push_back(s);
async_accept(s.sock, s.ssl);
}