aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/packages/generic/generic.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/packages/generic/generic.go')
-rw-r--r--routers/api/packages/generic/generic.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/packages/generic/generic.go b/routers/api/packages/generic/generic.go
index 8232931134..e66f3ee676 100644
--- a/routers/api/packages/generic/generic.go
+++ b/routers/api/packages/generic/generic.go
@@ -90,12 +90,12 @@ func UploadPackage(ctx *context.Context) {
return
}
- upload, close, err := ctx.UploadStream()
+ upload, needToClose, err := ctx.UploadStream()
if err != nil {
apiError(ctx, http.StatusInternalServerError, err)
return
}
- if close {
+ if needToClose {
defer upload.Close()
}