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:
parent
2b7e135839
commit
dca4af942f
1 changed files with 5 additions and 1 deletions
|
@ -679,7 +679,11 @@ class UPnPComponent(Component):
|
||||||
self.external_ip = CS.get_external_ip()
|
self.external_ip = CS.get_external_ip()
|
||||||
return
|
return
|
||||||
self.upnp = UPnP(self.component_manager.reactor, try_miniupnpc_fallback=True)
|
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:
|
if found and not self.upnp.miniupnpc_runner:
|
||||||
log.info("set up redirects using txupnp")
|
log.info("set up redirects using txupnp")
|
||||||
elif found and self.upnp.miniupnpc_runner:
|
elif found and self.upnp.miniupnpc_runner:
|
||||||
|
|
Loading…
Add table
Reference in a new issue