Avoid calling get-entries when range is invalid (end < begin)
end < begin can arise if we've rounded down end to avoid downloading a partial tile, but the log position is already within the partial tile (which can happen with a brand new log and -start_at_end).
This commit is contained in:
parent
a6af6c54ba
commit
71b296141e
|
@ -418,11 +418,13 @@ func downloadWorker(ctx context.Context, config *Config, ctlog *loglist.Log, cli
|
|||
case batch = <-batchesIn:
|
||||
}
|
||||
|
||||
entries, err := getEntriesFull(ctx, client, batch.begin, batch.end)
|
||||
if err != nil {
|
||||
return err
|
||||
if batch.end > batch.begin {
|
||||
entries, err := getEntriesFull(ctx, client, batch.begin, batch.end)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
batch.entries = entries
|
||||
}
|
||||
batch.entries = entries
|
||||
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
|
|
Loading…
Reference in New Issue