Implement new chunk directory structure

This commit is contained in:
Gilbert Chen
2017-11-07 12:05:39 -05:00
parent 7e1fb6130a
commit 86767b3df6
22 changed files with 663 additions and 606 deletions

View File

@@ -326,7 +326,7 @@ func (downloader *ChunkDownloader) Download(threadIndex int, task ChunkDownloadT
}
const MaxDownloadAttempts = 3
for downloadAttempt := 0;; downloadAttempt++ {
for downloadAttempt := 0; ; downloadAttempt++ {
err = downloader.storage.DownloadFile(threadIndex, chunkPath, chunk)
if err != nil {
if err == io.ErrUnexpectedEOF && downloadAttempt < MaxDownloadAttempts {