diff options
author | Linus Nordberg <linus@nordu.net> | 2016-12-02 08:13:23 +0100 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2016-12-02 08:13:23 +0100 |
commit | a280cd422af8ad7a6493b0bedc4f3739bdb444f8 (patch) | |
tree | 7ca87180852efcef9557d605b7f9ee0ee25ec884 | |
parent | b6e98f32655b906b4c525ae314439cbae56c1ccb (diff) |
Don't get new entries while we still have entries to fetch.
-rwxr-xr-x | tools/merge_fetch.py | 7 |
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: |