From 15ad0a36f677a88ecc6373eb7fb0cac1aaa15a4f Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 2 Apr 2007 20:09:48 +0000 Subject: [PATCH] possible fix to upnp close-down in case there are UPnP devices without WANIPConnection --- src/upnp.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/upnp.cpp b/src/upnp.cpp index 1ae8dee2f..0e38485a0 100644 --- a/src/upnp.cpp +++ b/src/upnp.cpp @@ -825,11 +825,15 @@ void upnp::on_expire(asio::error_code const& e) void upnp::close() { - if (m_disabled) return; - m_socket.close(); - boost::mutex::scoped_lock l(m_mutex); m_closing = true; + m_socket.close(); + + if (m_disabled) + { + m_devices.clear(); + return; + } for (std::set::iterator i = m_devices.begin() , end(m_devices.end()); i != end;)