mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-06 12:07:51 +01:00
a little safer
This commit is contained in:
1 parent
708e14fcfa
commit
3a58b7bac6
1 file changed
+4
-2
@@ -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) {
|
||||
x := copy(buffer[n:], data)
|
||||
n += x
|
||||
if n < len(buffer) {
|
||||
x := copy(buffer[n:], data)
|
||||
n += x
|
||||
}
|
||||
})
|
||||
if !shouldRetry {
|
||||
break
|
||||
|
||||
Reference in new issue
Block a user