Skip to content

Commit

Permalink
totalCancel is idempotent
Browse files Browse the repository at this point in the history
In this context totalCancel can be called multiple times,
so mention that it is idempotent (no need to wrap with once).
  • Loading branch information
vbauerster committed Mar 13, 2024
1 parent 8fe2d98 commit 52b6f88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion getparty.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ func (cmd *Cmd) Run(args []string, version, commit string) (err error) {
atomic.AddUint32(&doneCount, 1)
case p.Skip:
cmd.dlogger.Print("Dropping total bar")
totalCancel(true)
totalCancel(true) // totalCancel is idempotent
}
}()
return p.download(client, req, timeout, sleep)
Expand Down

0 comments on commit 52b6f88

Please sign in to comment.