merged fix from RC_0_16
This commit is contained in:
parent
3a2da49516
commit
158f59cb22
|
@ -2235,7 +2235,6 @@ retry:
|
|||
|
||||
TORRENT_ASSERT(!m_abort);
|
||||
m_listen_sockets.push_back(s);
|
||||
async_accept(s.sock, s.ssl);
|
||||
}
|
||||
|
||||
#ifdef TORRENT_USE_OPENSSL
|
||||
|
@ -2250,7 +2249,6 @@ retry:
|
|||
{
|
||||
TORRENT_ASSERT(!m_abort);
|
||||
m_listen_sockets.push_back(s);
|
||||
async_accept(s.sock, s.ssl);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -2266,7 +2264,6 @@ retry:
|
|||
{
|
||||
TORRENT_ASSERT(!m_abort);
|
||||
m_listen_sockets.push_back(s);
|
||||
async_accept(s.sock, s.ssl);
|
||||
}
|
||||
|
||||
#ifdef TORRENT_USE_OPENSSL
|
||||
|
@ -2282,7 +2279,6 @@ retry:
|
|||
{
|
||||
TORRENT_ASSERT(!m_abort);
|
||||
m_listen_sockets.push_back(s);
|
||||
async_accept(s.sock, s.ssl);
|
||||
}
|
||||
}
|
||||
#endif // TORRENT_USE_OPENSSL
|
||||
|
@ -2314,7 +2310,6 @@ retry:
|
|||
{
|
||||
TORRENT_ASSERT(!m_abort);
|
||||
m_listen_sockets.push_back(s);
|
||||
async_accept(s.sock, s.ssl);
|
||||
|
||||
if (m_listen_interface.address().is_v6())
|
||||
m_ipv6_interface = m_listen_interface;
|
||||
|
@ -2334,7 +2329,6 @@ retry:
|
|||
{
|
||||
TORRENT_ASSERT(!m_abort);
|
||||
m_listen_sockets.push_back(s);
|
||||
async_accept(s.sock, s.ssl);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -2350,6 +2344,7 @@ retry:
|
|||
if (m_listen_port_retries > 0)
|
||||
{
|
||||
m_listen_interface.port(m_listen_interface.port() + 1);
|
||||
--m_listen_port_retries;
|
||||
goto retry;
|
||||
}
|
||||
if (m_alerts.should_post<listen_failed_alert>())
|
||||
|
@ -2368,6 +2363,11 @@ retry:
|
|||
#endif
|
||||
ec.clear();
|
||||
|
||||
// initiate accepting on the listen sockets
|
||||
for (std::list<listen_socket_t>::iterator i = m_listen_sockets.begin()
|
||||
, end(m_listen_sockets.end()); i != end; ++i)
|
||||
async_accept(i->sock, i->ssl);
|
||||
|
||||
open_new_incoming_socks_connection();
|
||||
#if TORRENT_USE_I2P
|
||||
open_new_incoming_i2p_connection();
|
||||
|
|
|
@ -296,13 +296,15 @@ namespace libtorrent
|
|||
if (m_utp_sockets.size() > m_sett.connections_limit * 2)
|
||||
return false;
|
||||
|
||||
// create the new socket with this ID
|
||||
m_new_connection = id;
|
||||
|
||||
// UTP_LOGV("not found, new connection id:%d\n", m_new_connection);
|
||||
|
||||
boost::shared_ptr<socket_type> c(new (std::nothrow) socket_type(m_sock.get_io_service()));
|
||||
if (!c) return false;
|
||||
|
||||
TORRENT_ASSERT(m_new_connection == -1);
|
||||
// create the new socket with this ID
|
||||
m_new_connection = id;
|
||||
|
||||
instantiate_connection(m_sock.get_io_service(), proxy_settings(), *c, 0, this);
|
||||
utp_stream* str = c->get<utp_stream>();
|
||||
TORRENT_ASSERT(str);
|
||||
|
|
Loading…
Reference in New Issue