Skip to content

Commit d7f8d06

Browse files
authored
[remote] Don't close streaming layers ourselves (#768)
* [remote] Don't close streaming layers ourselves "The request Body, if non-nil, will be closed by the underlying Transport, even on errors." https://golang.org/pkg/net/http/#Client.Do Fixes #707 * Fix modules
1 parent d42b6a2 commit d7f8d06

File tree

4 files changed

+4
-14
lines changed

4 files changed

+4
-14
lines changed

go.mod

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go.sum

Lines changed: 2 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/v1/remote/write.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,6 @@ func (w *writer) initiateUpload(from, mount string) (location string, mounted bo
261261
// On failure, this will return an error. On success, this will return the location
262262
// header indicating how to commit the streamed blob.
263263
func (w *writer) streamBlob(blob io.ReadCloser, streamLocation string) (commitLocation string, err error) {
264-
defer blob.Close()
265-
266264
req, err := http.NewRequest(http.MethodPatch, streamLocation, blob)
267265
if err != nil {
268266
return "", err

vendor/modules.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ golang.org/x/text/unicode/norm
250250
# golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1
251251
## explicit
252252
golang.org/x/time/rate
253-
# golang.org/x/tools v0.0.0-20200910222312-571a207697e7
253+
# golang.org/x/tools v0.0.0-20200911153331-7ad463ce66dd
254254
## explicit
255255
golang.org/x/tools/go/ast/astutil
256256
golang.org/x/tools/go/gcexportdata

0 commit comments

Comments
 (0)