From 5028f7b9d93ebddc763da7d75eeb0f415103b254 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Sat, 18 Mar 2017 16:16:35 +0100 Subject: [PATCH] fixup! pylightning: RPC returns a failure if the connection is lost --- tests/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/utils.py b/tests/utils.py index 20869a2c6..09a55d6c8 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -198,7 +198,10 @@ class LightningNode(object): tx = self.bitcoin.rpc.gettransaction(txid) 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.daemon = True t.start()