summaryrefslogtreecommitdiffstats
path: root/routers/repo/download.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo/download.go')
-rw-r--r--routers/repo/download.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/repo/download.go b/routers/repo/download.go
index 78c6088607..78c4b519be 100644
--- a/routers/repo/download.go
+++ b/routers/repo/download.go
@@ -45,10 +45,11 @@ func ServeData(ctx *context.Context, name string, reader io.Reader) error {
// ServeBlob download a git.Blob
func ServeBlob(ctx *context.Context, blob *git.Blob) error {
- dataRc, err := blob.Data()
+ dataRc, err := blob.DataAsync()
if err != nil {
return err
}
+ defer dataRc.Close()
return ServeData(ctx, ctx.Repo.TreePath, dataRc)
}