mirror of
https://github.com/rclone/rclone.git
synced 2024-11-25 01:44:41 +01:00
s3: fix accounting for mulpart transfers after migration to SDKv2 #4989
This commit is contained in:
parent
af9f8ced80
commit
6b58cd0870
@ -5988,7 +5988,13 @@ func (w *s3ChunkWriter) WriteChunk(ctx context.Context, chunkNumber int, reader
|
||||
if do, ok := reader.(pool.DelayAccountinger); ok {
|
||||
// To figure out this number, do a transfer and if the accounted size is 0 or a
|
||||
// multiple of what it should be, increase or decrease this number.
|
||||
do.DelayAccounting(3)
|
||||
//
|
||||
// For transfers over https the SDK does not sign the body whereas over http it does
|
||||
if len(w.f.opt.Endpoint) >= 5 && strings.EqualFold(w.f.opt.Endpoint[:5], "http:") {
|
||||
do.DelayAccounting(3)
|
||||
} else {
|
||||
do.DelayAccounting(2)
|
||||
}
|
||||
}
|
||||
|
||||
// create checksum of buffer for integrity checking
|
||||
|
Loading…
Reference in New Issue
Block a user