From 3af8b7bd0ce518cead7d4aa56300bdaf223f66ac Mon Sep 17 00:00:00 2001 From: Jack Date: Wed, 3 Aug 2016 01:27:40 -0400 Subject: [PATCH] use upnp redirects if they're already set --- lbrynet/core/Session.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lbrynet/core/Session.py b/lbrynet/core/Session.py index c8ff3f290..ee8ae26c2 100644 --- a/lbrynet/core/Session.py +++ b/lbrynet/core/Session.py @@ -174,6 +174,7 @@ class LBRYSession(object): log.info("Set UPnP redirect for TCP port %d", self.peer_port) else: log.warning("UPnP redirect already set for TCP port %d", self.peer_port) + self.upnp_redirects.append((self.peer_port, 'TCP')) if self.dht_node_port is not None: if u.getspecificportmapping(self.dht_node_port, 'UDP') is None: u.addportmapping(self.dht_node_port, 'UDP', u.lanaddr, self.dht_node_port, 'LBRY DHT port', '') @@ -181,6 +182,7 @@ class LBRYSession(object): log.info("Set UPnP redirect for UPD port %d", self.dht_node_port) else: log.warning("UPnP redirect already set for UDP port %d", self.dht_node_port) + self.upnp_redirects.append((self.dht_node_port, 'UDP')) return True return False