mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 07:34:24 +01:00
fixup! pylightning: RPC returns a failure if the connection is lost
This commit is contained in:
committed by
Rusty Russell
parent
225f29abf4
commit
5028f7b9d9
@@ -198,7 +198,10 @@ class LightningNode(object):
|
|||||||
tx = self.bitcoin.rpc.gettransaction(txid)
|
tx = self.bitcoin.rpc.gettransaction(txid)
|
||||||
|
|
||||||
def call_connect():
|
def call_connect():
|
||||||
self.rpc.connect('127.0.0.1', remote_node.daemon.port, tx['hex'], async=False)
|
try:
|
||||||
|
self.rpc.connect('127.0.0.1', remote_node.daemon.port, tx['hex'], async=False)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
t = threading.Thread(target=call_connect)
|
t = threading.Thread(target=call_connect)
|
||||||
t.daemon = True
|
t.daemon = True
|
||||||
t.start()
|
t.start()
|
||||||
|
|||||||
Reference in New Issue
Block a user