possible fix to upnp close-down in case there are UPnP devices without WANIPConnection
This commit is contained in:
parent
ec2962dd62
commit
15ad0a36f6
10
src/upnp.cpp
10
src/upnp.cpp
|
@ -825,11 +825,15 @@ void upnp::on_expire(asio::error_code const& e)
|
||||||
|
|
||||||
void upnp::close()
|
void upnp::close()
|
||||||
{
|
{
|
||||||
if (m_disabled) return;
|
|
||||||
m_socket.close();
|
|
||||||
|
|
||||||
boost::mutex::scoped_lock l(m_mutex);
|
boost::mutex::scoped_lock l(m_mutex);
|
||||||
m_closing = true;
|
m_closing = true;
|
||||||
|
m_socket.close();
|
||||||
|
|
||||||
|
if (m_disabled)
|
||||||
|
{
|
||||||
|
m_devices.clear();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (std::set<rootdevice>::iterator i = m_devices.begin()
|
for (std::set<rootdevice>::iterator i = m_devices.begin()
|
||||||
, end(m_devices.end()); i != end;)
|
, end(m_devices.end()); i != end;)
|
||||||
|
|
Loading…
Reference in New Issue