more anonymous upnp

thanks to 0netdwf for reporting
This commit is contained in:
caryoscelus 2023-07-23 09:37:52 +00:00
parent 00f298a8e9
commit f94765f7b9
2 changed files with 7 additions and 15 deletions

View file

@ -28,11 +28,8 @@ class PeerPortchecker(object):
return urllib.request.urlopen(req, timeout=20.0)
def portOpen(self, port):
# self.log.info("Not trying to open port using UpnpPunch until it's proven robust...")
# return False
try:
UpnpPunch.ask_to_open_port(port, 'ZeroNet', retries=3, protos=["TCP"])
UpnpPunch.ask_to_open_port(port, retries=3, protos=["TCP"])
self.upnp_port_opened = True
except Exception as err:
self.log.warning("UpnpPunch run error: %s" % Debug.formatException(err))