mount: configurable read wait time

This commit is contained in:
Chris Lu
2020-10-10 20:09:43 -07:00
parent 9b0e8ef026
commit d155f907c2
4 changed files with 20 additions and 7 deletions

View File

@@ -98,7 +98,7 @@ func retriedFetchChunkData(urlStrings []string, cipherKey []byte, isGzipped bool
var err error
var buffer bytes.Buffer
for waitTime := time.Second; waitTime < 10*time.Second; waitTime += waitTime / 2 {
for waitTime := time.Second; waitTime < ReadWaitTime; waitTime += waitTime / 2 {
for _, urlString := range urlStrings {
err = util.ReadUrlAsStream(urlString, cipherKey, isGzipped, isFullChunk, offset, size, func(data []byte) {
buffer.Write(data)