Skip to content

Commit

Permalink
fix: do not pass incoming context for caching
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana committed Sep 16, 2021
1 parent 1330f3a commit 3f8eaa1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -698,10 +698,11 @@ func cacheHandler(w http.ResponseWriter, r *http.Request, b *Backend) http.Handl
pipeReader, pipeWriter := io.Pipe()
mw := cacheMultiWriter(w, pipeWriter)
go func() {
_, err := clnt.PutObject(r.Context(), clnt.bucket, key,
_, err := clnt.PutObject(context.Background(), clnt.bucket, key,
io.LimitReader(pipeReader, resultContentLength), resultContentLength,
"", "", minio.PutObjectOptions{
UserMetadata: getPutMetadata(result.Header),
UserMetadata: getPutMetadata(result.Header),
DisableMultipart: true,
})
if err != nil {
clnt.setOffline()
Expand Down

0 comments on commit 3f8eaa1

Please sign in to comment.