From dca4af942fbe95547794213775f0a62cd04a393f Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Thu, 9 Aug 2018 11:28:07 -0400 Subject: [PATCH] also try/except around upnp.discover -catches edge case where miniupnpc fallback is used and a device is found but selectigd fails --- lbrynet/daemon/Components.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lbrynet/daemon/Components.py b/lbrynet/daemon/Components.py index 01288c5e5..e109c7b0f 100644 --- a/lbrynet/daemon/Components.py +++ b/lbrynet/daemon/Components.py @@ -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: