synchronizer: wait for interface

This commit is contained in:
ThomasV 2013-09-02 20:52:14 +02:00
parent a16b0f4630
commit 1650eefdd3
2 changed files with 5 additions and 1 deletions

View File

@ -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)

View File

@ -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 = []