satellite/metainfo: Close client DeleteObjectPieces
The DeleteObjectPieces must close the storage node client once it has finished deleting its pieces. Change-Id: I08eb8af8e4215d77d59b52f5055211b918374ab4
This commit is contained in:
parent
082ec81714
commit
922c43f921
@ -2399,6 +2399,14 @@ func (endpoint *Endpoint) DeleteObjectPieces(
|
||||
// Pieces will be collected by garbage collector
|
||||
return
|
||||
}
|
||||
defer func() {
|
||||
err := client.Close()
|
||||
endpoint.log.Warn("error closing the storage node client connection",
|
||||
zap.Stringer("node_id", node.Id),
|
||||
zap.Stringer("node_info", node),
|
||||
zap.Error(err),
|
||||
)
|
||||
}()
|
||||
|
||||
for _, pieceID := range nodePieces {
|
||||
err := client.DeletePiece(ctx, pieceID)
|
||||
|
Loading…
Reference in New Issue
Block a user