mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-12-18 12:47:50 +08:00
a little safer
This commit is contained in:
parent
708e14fcfa
commit
3a58b7bac6
@ -124,8 +124,10 @@ func retriedFetchChunkData(buffer []byte, urlStrings []string, cipherKey []byte,
|
||||
urlString = url.PathEscape(urlString)
|
||||
}
|
||||
shouldRetry, err = util.ReadUrlAsStream(urlString+"?readDeleted=true", cipherKey, isGzipped, isFullChunk, offset, len(buffer), func(data []byte) {
|
||||
if n < len(buffer) {
|
||||
x := copy(buffer[n:], data)
|
||||
n += x
|
||||
}
|
||||
})
|
||||
if !shouldRetry {
|
||||
break
|
||||
|
Loading…
Reference in New Issue
Block a user