also try/except around upnp.discover

-catches edge case where miniupnpc fallback is used and a device is found but selectigd fails
This commit is contained in:
Jack Robison 2018-08-09 11:28:07 -04:00
parent 2b7e135839
commit dca4af942f
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -679,7 +679,11 @@ class UPnPComponent(Component):
self.external_ip = CS.get_external_ip()
return
self.upnp = UPnP(self.component_manager.reactor, try_miniupnpc_fallback=True)
found = yield self.upnp.discover()
try:
found = yield self.upnp.discover()
except Exception as err:
log.warning("upnp discovery failed: %s", err)
found = False
if found and not self.upnp.miniupnpc_runner:
log.info("set up redirects using txupnp")
elif found and self.upnp.miniupnpc_runner: