From fb9ffb8360917b95668cd9d00073e2af9ddbf2a1 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 20 Jul 2009 02:28:56 +0000 Subject: [PATCH] set default lease duration to 0 for UPnP (permanent lease) --- include/libtorrent/upnp.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/libtorrent/upnp.hpp b/include/libtorrent/upnp.hpp index 2a973b371..a088172e9 100644 --- a/include/libtorrent/upnp.hpp +++ b/include/libtorrent/upnp.hpp @@ -129,7 +129,11 @@ private: static address_v4 upnp_multicast_address; static udp::endpoint upnp_multicast_endpoint; - enum { default_lease_time = 3600 }; + // there are routers that's don't support timed + // port maps, without returning error 725. It seems + // safer to always assume that we have to ask for + // permanent leases + enum { default_lease_time = 0 }; void resend_request(error_code const& e); void on_reply(udp::endpoint const& from, char* buffer