Skip to content

Commit

Permalink
fix: async callback run multiple times in fPutObject
Browse files Browse the repository at this point in the history
  • Loading branch information
nomagick committed Jul 3, 2022
1 parent 61436e2 commit aa119d0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/minio.js
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,15 @@ export class Client {
async.whilst(
cb => { cb(null, uploadedSize < size) },
cb => {
var cbTriggered = false
var origCb = cb
cb = function () {
if (cbTriggered) {
return
}
cbTriggered = true
return origCb.apply(this, arguments)
}
var part = parts[partNumber]
var hash = transformers.getHashSummer(this.enableSHA256)
var length = partSize
Expand Down

0 comments on commit aa119d0

Please sign in to comment.