fixup! pylightning: RPC returns a failure if the connection is lost

This commit is contained in:
Christian Decker 2017-03-18 16:16:35 +01:00 committed by Rusty Russell
parent 225f29abf4
commit 5028f7b9d9

View File

@ -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():
try:
self.rpc.connect('127.0.0.1', remote_node.daemon.port, tx['hex'], async=False) 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()