Skip to content

Commit d25de6b

Browse files
committed
merge gRPC conn caches
Signed-off-by: Leonard Lyubich <[email protected]>
1 parent 8eeebcd commit d25de6b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

cmd/neofs-node/config.go

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -379,16 +379,13 @@ func initCfg(appCfg *config.Config) *cfg {
379379
minConnTimeout := appCfg.APIClient.MinConnectionTime
380380
pingInterval := appCfg.APIClient.PingInterval
381381
pingTimeout := appCfg.APIClient.PingTimeout
382-
newClientCache := func(scope string) *cache.Clients {
383-
return cache.NewClients(c.log.With(zap.String("scope", scope)), &buffers, streamTimeout,
384-
minConnTimeout, pingInterval, pingTimeout)
385-
}
382+
cs := cache.NewClients(c.log, &buffers, streamTimeout, minConnTimeout, pingInterval, pingTimeout)
386383
c.shared = shared{
387384
basics: basicSharedConfig,
388385
localAddr: netAddr,
389-
clientCache: newClientCache("read"),
390-
bgClientCache: newClientCache("background"),
391-
putClientCache: newClientCache("put"),
386+
clientCache: cs,
387+
bgClientCache: cs,
388+
putClientCache: cs,
392389
persistate: persistate,
393390
}
394391
c.cfgContainer = cfgContainer{

0 commit comments

Comments
 (0)