satellite/metainfo: Close client DeleteObjectPieces
The DeleteObjectPieces should print out the warning on closing the connections only if there was an error. Change-Id: If3d7ab256d8508c08388c1f22c7dd1eb819d2509
This commit is contained in:
parent
922c43f921
commit
05e4a86654
@ -2401,11 +2401,13 @@ func (endpoint *Endpoint) DeleteObjectPieces(
|
||||
}
|
||||
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),
|
||||
)
|
||||
if err != nil {
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user