Commit 75c4da95 authored by Sandeep S. Shewalkar's avatar Sandeep S. Shewalkar
Browse files

DownloadHelper modifications

continue added inside following condition :
--> hash == ERR_FILE_HASH
--> fileInfo.Size() < FILE_SIZE
parent 24662501
Branches
1 merge request!39DownloadHelper modifications
Showing with 4 additions and 2 deletions
......@@ -91,13 +91,15 @@ func DownloadFile(sourcePath, destinationPath, jwtToken string, retryCnt int) (b
if err != nil {
logginghelper.LogError("Download failed: ", err)
RestoreBackup(destinationPath)
time.Sleep(200 * time.Millisecond)
continue
}
if hash == ERR_FILE_HASH {
logginghelper.LogError("Download failed: ", err)
RestoreBackup(destinationPath)
time.Sleep(200 * time.Millisecond)
continue
}
time.Sleep(200 * time.Millisecond)
continue
}
}
if resp.HTTPResponse != nil && (resp.HTTPResponse.StatusCode == 200 || resp.HTTPResponse.StatusCode == 206) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment