fix setting lease duration to 0

This commit is contained in:
Arvid Norberg 2020-04-26 12:43:39 +02:00 committed by Arvid Norberg
parent 5b58dc0d38
commit e2501c061d
1 changed files with 1 additions and 1 deletions

View File

@ -1462,7 +1462,7 @@ void upnp::on_upnp_map_response(error_code const& e
{
m_callback.on_port_mapping(mapping, d.external_ip, m.external_port, m.protocol, error_code()
, portmap_transport::upnp);
if (d.use_lease_duration)
if (d.use_lease_duration && m_settings.get_int(settings_pack::upnp_lease_duration) != 0)
{
time_point const now = aux::time_now();
m.expires = now + seconds(