better publish threads

This commit is contained in:
HelloZeroNet 2015-03-31 01:01:39 +02:00
parent 30e234ade8
commit 10c6d4a7a3
1 changed files with 1 additions and 1 deletions

View File

@ -219,7 +219,7 @@ class Site:
random.shuffle(peers)
event_done = gevent.event.AsyncResult()
for i in range(min(1+len(self.peers), limit)/2):
for i in range(min(len(self.peers), limit, 5)): # Max 5 thread
publisher = gevent.spawn(self.publisher, inner_path, peers, published, limit, event_done)
publishers.append(publisher)