From 57d525ee9347b7d587839388fceb980cbc5fd645 Mon Sep 17 00:00:00 2001 From: crebsy <121096251+crebsy@users.noreply.github.com> Date: Mon, 8 Jul 2024 19:52:49 +0200 Subject: [PATCH] fix: move offset and length into retry logic --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 0bfcf9a..aaba306 100644 --- a/main.go +++ b/main.go @@ -280,10 +280,10 @@ func downloadoor(index *moonproto.Index, chunkChan chan<- Chunk, downloadChan <- // contains already the url_prefix but missing the leading "/" libName := "/" + index.Libraries[libChunk.LibraryIndex].Name retries := 0 - localStartOffset := libChunk.StartOffset - localLength := libChunk.Length //fmt.Printf("start=%s, startOffset=%d\n", u.Path, libChunk.StartOffset) retry: + localStartOffset := libChunk.StartOffset + localLength := libChunk.Length // get url for lib libUrlCreds := getSnapUrlCreds(libName) u, err := url.Parse(libUrlCreds.Url)