summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2016-12-02 08:13:23 +0100
committerLinus Nordberg <linus@nordu.net>2016-12-02 08:13:23 +0100
commita280cd422af8ad7a6493b0bedc4f3739bdb444f8 (patch)
tree7ca87180852efcef9557d605b7f9ee0ee25ec884
parentb6e98f32655b906b4c525ae314439cbae56c1ccb (diff)
Don't get new entries while we still have entries to fetch.
-rwxr-xr-xtools/merge_fetch.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/merge_fetch.py b/tools/merge_fetch.py
index c66dc03..af05209 100755
--- a/tools/merge_fetch.py
+++ b/tools/merge_fetch.py
@@ -142,9 +142,10 @@ def merge_fetch_worker(args, localconfig, storagenode, pipe):
read_parent_messages(pipe, to_fetch) # Drain pipe.
## Ask node for more entries.
- for ehash in get_new_entries(name, url, own_key, paths):
- pipe.send(('NEWENTRY', ehash))
- read_parent_messages(pipe, to_fetch) # Drain pipe.
+ if not to_fetch:
+ for ehash in get_new_entries(name, url, own_key, paths):
+ pipe.send(('NEWENTRY', ehash))
+ read_parent_messages(pipe, to_fetch) # Drain pipe.
## Wait some if nothing to do.
if not to_fetch: