accounting: add context.Context #3257 #4685

This commit is contained in:
Nick Craig-Wood
2020-11-05 16:59:59 +00:00
parent e3fe31f7cb
commit 1fb6ad700f
29 changed files with 138 additions and 109 deletions

View File

@@ -206,7 +206,7 @@ func (s *server) serveFile(w http.ResponseWriter, r *http.Request, remote string
// Account the transfer
tr := accounting.Stats(r.Context()).NewTransfer(obj)
defer tr.Done(nil)
defer tr.Done(r.Context(), nil)
// FIXME in = fs.NewAccount(in, obj).WithBuffer() // account the transfer
// Serve the file