defer closing the ReadCloser in ObjectStoreGRPCServer.GetObject

Signed-off-by: DheerajSShetty <dheerajs@vmware.com>

Fixes #1093
pull/1236/head
DheerajSShetty 2019-02-28 11:51:10 -08:00
parent e4771f582b
commit 032aaac508
2 changed files with 2 additions and 0 deletions

View File

@ -0,0 +1 @@
Need to defer closing the the ReadCloser in ObjectStoreGRPCServer.GetObject

View File

@ -284,6 +284,7 @@ func (s *ObjectStoreGRPCServer) GetObject(req *proto.GetObjectRequest, stream pr
if err != nil {
return err
}
defer rdr.Close()
chunk := make([]byte, byteChunkSize)
for {