possible fix to upnp close-down in case there are UPnP devices without WANIPConnection

This commit is contained in:
Arvid Norberg 2007-04-02 20:09:48 +00:00
parent ec2962dd62
commit 15ad0a36f6
1 changed files with 7 additions and 3 deletions

View File

@ -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<rootdevice>::iterator i = m_devices.begin()
, end(m_devices.end()); i != end;)