mirror of
https://github.com/ollama/ollama.git
synced 2025-05-11 18:36:41 +02:00
Fix download retry issue
This commit is contained in:
parent
afd2b058b4
commit
db2ffa79f1
1 changed files with 1 additions and 1 deletions
|
@ -221,7 +221,7 @@ func (b *blobDownload) downloadChunk(ctx context.Context, requestURL *url.URL, w
|
|||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
n, err := io.CopyN(w, io.TeeReader(resp.Body, part), part.Size)
|
||||
n, err := io.CopyN(w, io.TeeReader(resp.Body, part), part.Size-part.Completed)
|
||||
if err != nil && !errors.Is(err, context.Canceled) && !errors.Is(err, io.ErrUnexpectedEOF) {
|
||||
// rollback progress
|
||||
b.Completed.Add(-n)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue