Limit retries to 10

This commit is contained in:
Richard Patel 2018-11-18 21:05:26 +01:00
parent 1625d6c888
commit d332f06659
No known key found for this signature in database
GPG Key ID: C268B2BBDA2ABECB

View File

@ -102,9 +102,8 @@ func uploadChunks(websiteId uint64, f *os.File) error {
multi.Close()
for retried := false; true; retried = true {
err = nil
if retried {
for retries := 0; retries < 10; retries++ {
if retries > 0 {
// Error occurred, retry upload
time.Sleep(5 * time.Second)
}