From e2501c061d74ce37e2cf61e1822a72ccc1d0849e Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 26 Apr 2020 12:43:39 +0200 Subject: [PATCH] fix setting lease duration to 0 --- src/upnp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/upnp.cpp b/src/upnp.cpp index a0ce2f001..32ed3b6b1 100644 --- a/src/upnp.cpp +++ b/src/upnp.cpp @@ -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(