Skip to content

Commit

Permalink
Reset retry counter (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
gartnera authored Dec 18, 2024
1 parent fbcc335 commit b7033e1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions download.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ func (p *RetryParameters) Wait(ctx context.Context, currentPosition uint64) erro
// reset wait period if first read or we are making sufficient progress
if p.currentWait == 0 || (p.prevPos != 0 && currentPosition > p.prevPos+oneMB) {
p.currentWait = p.BaseWait
p.retryCtr = 0
}
p.prevPos = currentPosition
defer func() {
Expand Down

0 comments on commit b7033e1

Please sign in to comment.