git://git.novaco.in
/
p2pool.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(from parent 1:
884d06b
)
added pause in share downloader to avoid numerous fast requests for shares nobody has
author
Forrest Voight
<forrest@forre.st>
Tue, 18 Sep 2012 18:25:28 +0000 (14:25 -0400)
committer
Forrest Voight
<forrest@forre.st>
Tue, 18 Sep 2012 18:25:35 +0000 (14:25 -0400)
p2pool/main.py
patch
|
blob
|
history
diff --git
a/p2pool/main.py
b/p2pool/main.py
index
6f89141
..
b89903a
100644
(file)
--- a/
p2pool/main.py
+++ b/
p2pool/main.py
@@
-427,8
+427,12
@@
def main(args, net, datadir_path, merged_urls, worker_endpoint):
)
except:
log.err(None, 'in download_shares:')
- else:
- p2p_node.handle_shares(shares, peer)
+ continue
+
+ if not shares:
+ yield deferral.sleep(1) # sleep so we don't keep rerequesting the same share nobody has
+ continue
+ p2p_node.handle_shares(shares, peer)
print ' ...success!'
print