forked from TrueCloudLab/frostfs-node
[#567] cmd/node: Close cached clients on shutdown
Call `CloseAll` on all `ClientCache` instances on application shutdown. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
bf92e895c0
commit
9b2939d538
3 changed files with 9 additions and 1 deletions
|
@ -155,6 +155,8 @@ func initObjectService(c *cfg) {
|
|||
clientCache := cache.NewSDKClientCache(
|
||||
client.WithDialTimeout(c.viper.GetDuration(cfgAPIClientDialTimeout)))
|
||||
|
||||
c.onShutdown(clientCache.CloseAll)
|
||||
|
||||
clientConstructor := &reputationClientConstructor{
|
||||
log: c.log,
|
||||
nmSrc: c.cfgObject.netMapStorage,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue