no need to wait for 4 retries before mapping ports on a router

This commit is contained in:
Arvid Norberg 2009-03-04 09:40:16 +00:00
parent b9ab3f056b
commit 079c6e6e03
1 changed files with 1 additions and 7 deletions

View File

@ -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)
{