From b1e5a509befc0d86446445e6c8f93742d97eaae3 Mon Sep 17 00:00:00 2001 From: Forrest Voight Date: Tue, 18 Sep 2012 14:25:28 -0400 Subject: [PATCH] added pause in share downloader to avoid numerous fast requests for shares nobody has --- p2pool/main.py | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/p2pool/main.py b/p2pool/main.py index 6f89141..b89903a 100644 --- 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 -- 1.7.1