Browse Source

fix peers script

283
ThomasV 11 years ago
parent
commit
466f325b88
  1. 5
      scripts/peers

5
scripts/peers

@ -26,16 +26,17 @@ i.stop()
print "Contacting %d servers"%len(peers)
# start interfaces
q2 = Queue.Queue()
config = SimpleConfig()
interfaces = map ( lambda server: Interface(server, config), peers )
reached_servers = []
for i in interfaces:
i.start(q)
i.start(q2)
t0 = time.time()
while peers:
try:
i, r = q.get(timeout=1)
i, r = q2.get(timeout=1)
except:
if time.time() - t0 > 10:
print "timeout"

Loading…
Cancel
Save