put *msgp.Reader back to pool (#17156)

This commit is contained in:
jiuker 2023-05-08 22:51:39 +08:00 committed by GitHub
parent 5b364bca1f
commit e3a070e3de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -1294,6 +1294,7 @@ func (s *storageRESTServer) ReadMultiple(w http.ResponseWriter, r *http.Request)
var req ReadMultipleReq var req ReadMultipleReq
mr := msgpNewReader(r.Body) mr := msgpNewReader(r.Body)
defer readMsgpReaderPool.Put(mr)
err := req.DecodeMsg(mr) err := req.DecodeMsg(mr)
if err != nil { if err != nil {
rw.CloseWithError(err) rw.CloseWithError(err)