commit 1650eefdd3b10b05973d0e501c46b8084747b22b parent a16b0f4630282a11b26576a582df220dcbdaf6aa Author: ThomasV <thomasv@gitorious> Date: Mon, 2 Sep 2013 20:52:14 +0200 synchronizer: wait for interface Diffstat:
M | lib/blockchain.py | | | 2 | +- |
M | lib/wallet.py | | | 4 | ++++ |
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/blockchain.py b/lib/blockchain.py @@ -59,7 +59,7 @@ class BlockchainVerifier(threading.Thread): def get_new_response(self): # listen to interfaces, forward to verifier using the queue - while 1: + while self.is_running(): for i in self.interfaces: try: r = i.get_response('verifier',timeout=0) diff --git a/lib/wallet.py b/lib/wallet.py @@ -1353,6 +1353,10 @@ class WalletSynchronizer(threading.Thread): def run(self): + if not self.interface.is_connected: + print_error( "synchronizer: waiting for interface") + self.interface.connect_event.wait() + with self.lock: self.running = True requested_tx = []