Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
orangecat
ollama
Commits
6adca97f
"vscode:/vscode.git/clone" did not exist on "2ca894da7be755711cbbdf56c74bb7904bfd8417"
Unverified
Commit
6adca97f
authored
May 24, 2024
by
Michael Yang
Committed by
GitHub
May 24, 2024
Browse files
Merge pull request #4619 from noxer/patch-1
Fix download retry issue
parents
9a3c8003
db2ffa79
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
server/download.go
server/download.go
+1
-1
No files found.
server/download.go
View file @
6adca97f
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment