Skip to content

Commit

Permalink
fix: retry also if snap url creds can't be retrieved
Browse files Browse the repository at this point in the history
  • Loading branch information
crebsy committed Jul 8, 2024
1 parent 57d525e commit 3de2348
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,11 @@ func downloadoor(index *moonproto.Index, chunkChan chan<- Chunk, downloadChan <-
libUrlCreds := getSnapUrlCreds(libName)
u, err := url.Parse(libUrlCreds.Url)
if err != nil {
retries += 1
if retries <= MAX_RETRIES {
time.Sleep(1 * time.Second)
goto retry
}
panic(err)
}

Expand Down

0 comments on commit 3de2348

Please sign in to comment.