From 6254f53716e29a27536ae157ab661d7fca731d16 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Thu, 8 Jul 2021 03:41:51 -0300 Subject: [PATCH] propagate external ip changes from upnp component to dht node protocol --- lbry/extras/daemon/components.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lbry/extras/daemon/components.py b/lbry/extras/daemon/components.py index e55ec342d..822022f32 100644 --- a/lbry/extras/daemon/components.py +++ b/lbry/extras/daemon/components.py @@ -481,6 +481,10 @@ class UPnPComponent(Component): log.info("external ip changed from %s to %s", self.external_ip, external_ip) if external_ip: self.external_ip = external_ip + dht_component = self.component_manager.get_component(DHT_COMPONENT) + if dht_component: + dht_node = dht_component.component + dht_node.protocol.external_ip = external_ip # assert self.external_ip is not None # TODO: handle going/starting offline if not self.upnp_redirects and self.upnp: # setup missing redirects