adds defer close for node conn in audit verifier (#1634)

This commit is contained in:
Natalie Villasana 2019-04-03 09:42:24 -04:00 committed by GitHub
parent 6028d8c3de
commit e2a43c3fb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -191,6 +191,12 @@ func (d *defaultDownloader) getShare(ctx context.Context, limit *pb.AddressedOrd
conn,
piecestore.DefaultConfig,
)
defer func() {
err := ps.Close()
if err != nil {
d.log.Error("audit verifier failed to close conn to node: %+v", zap.Error(err))
}
}()
offset := int64(shareSize) * stripeIndex