no need to wait for 4 retries before mapping ports on a router
This commit is contained in:
parent
b9ab3f056b
commit
079c6e6e03
|
@ -75,7 +75,6 @@ upnp::upnp(io_service& ios, connection_queue& cc
|
|||
, m_cc(cc)
|
||||
{
|
||||
TORRENT_ASSERT(cb);
|
||||
m_retry_count = 0;
|
||||
|
||||
if (state)
|
||||
{
|
||||
|
@ -500,13 +499,8 @@ void upnp::on_reply(udp::endpoint const& from, char* buffer
|
|||
}
|
||||
|
||||
|
||||
// since we're using udp, send the query 4 times
|
||||
// just to make sure we find all devices
|
||||
if (m_retry_count >= 4 && !m_devices.empty())
|
||||
if (!m_devices.empty())
|
||||
{
|
||||
error_code ec;
|
||||
m_broadcast_timer.cancel(ec);
|
||||
|
||||
for (std::set<rootdevice>::iterator i = m_devices.begin()
|
||||
, end(m_devices.end()); i != end; ++i)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue