trpartition->rsplit - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 0924503cb67a55abac2b576d00db4d02b097c461 DIR parent 776caeeff00f34d9380a16b431f0740ca9196ca9 HTML Author: ThomasV <thomasv@electrum.org> Date: Thu, 31 Jan 2019 19:43:42 +0100 rpartition->rsplit Diffstat: M electrum/lnworker.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- DIR diff --git a/electrum/lnworker.py b/electrum/lnworker.py t@@ -792,10 +792,10 @@ class LNWorker(PrintError): await self.network.lnwatcher.on_network_update('network_updated') # ping watcher to check our channels listen_addr = self.config.get('lightning_listen') if listen_addr: - adr, colon, port = listen_addr.rpartition(':') - if adr[0] == '[': + addr, port = listen_addr.rsplit(':', 2) + if addr[0] == '[': # ipv6 - adr = adr[1:-1] + addr = addr[1:-1] async def cb(reader, writer): t = LNResponderTransport(self.node_keypair.privkey, reader, writer) node_id = await t.handshake() t@@ -807,7 +807,7 @@ class LNWorker(PrintError): await self.network.main_taskgroup.spawn(peer.main_loop()) self.network.trigger_callback('ln_status') - await asyncio.start_server(cb, adr, int(port)) + await asyncio.start_server(cb, addr, int(port)) while True: await asyncio.sleep(1) now = time.time()