mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-28 07:51:27 +00:00
rpartition->rsplit
This commit is contained in:
parent
776caeeff0
commit
0924503cb6
1 changed files with 4 additions and 4 deletions
|
@ -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()
|
||||
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue