Skip to content

Commit

Permalink
set p.Stop for non resumable session
Browse files Browse the repository at this point in the history
This makes sure that p.isDone returns true eventually.
  • Loading branch information
vbauerster committed Jan 10, 2022
1 parent 9095d1d commit 0ca812e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions part.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,9 @@ func (p *Part) download(
p.dlogger.Printf("Written: %d", p.Written-pWrittenSnap)

if err == io.EOF {
if p.total() <= 0 {
p.Stop = p.Written - 1
}
return false, nil
}

Expand Down

0 comments on commit 0ca812e

Please sign in to comment.