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
db2ffa79
"examples/pytorch/git@developer.sourcefind.cn:OpenDAS/dgl.git" did not exist on "8801154b3d8b62681314d0ff99b87830cb397b77"
Unverified
Commit
db2ffa79
authored
May 24, 2024
by
Tim Scheuermann
Committed by
GitHub
May 24, 2024
Browse files
Fix download retry issue
parent
afd2b058
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 @
db2ffa79
...
@@ -221,7 +221,7 @@ func (b *blobDownload) downloadChunk(ctx context.Context, requestURL *url.URL, w
...
@@ -221,7 +221,7 @@ func (b *blobDownload) downloadChunk(ctx context.Context, requestURL *url.URL, w
}
}
defer
resp
.
Body
.
Close
()
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
)
{
if
err
!=
nil
&&
!
errors
.
Is
(
err
,
context
.
Canceled
)
&&
!
errors
.
Is
(
err
,
io
.
ErrUnexpectedEOF
)
{
// rollback progress
// rollback progress
b
.
Completed
.
Add
(
-
n
)
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