mirror of https://github.com/minio/minio.git
fix: avoid divide by zero error single node distributed setup (#10862)
This commit is contained in:
parent
8e8ddf7233
commit
8df6112204
|
@ -237,6 +237,9 @@ func replicateObject(ctx context.Context, objInfo ObjectInfo, objectAPI ObjectLa
|
|||
// Setup bandwidth throttling
|
||||
peers, _ := globalEndpoints.peers()
|
||||
totalNodesCount := len(peers)
|
||||
if totalNodesCount == 0 {
|
||||
totalNodesCount = 1 // For standalone erasure coding
|
||||
}
|
||||
b := target.BandwidthLimit / int64(totalNodesCount)
|
||||
var headerSize int
|
||||
for k, v := range putOpts.Header() {
|
||||
|
|
Loading…
Reference in New Issue