diff --git a/src/upnp.cpp b/src/upnp.cpp index c180cb8cb..2f1642400 100644 --- a/src/upnp.cpp +++ b/src/upnp.cpp @@ -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::iterator i = m_devices.begin() , end(m_devices.end()); i != end; ++i) {