forked from TrueCloudLab/frostfs-node
[#1212] morph: Fix NPE in multi client
Share multi cache between single clients. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
cbc816d57d
commit
0e0a675f35
2 changed files with 8 additions and 5 deletions
|
@ -92,12 +92,12 @@ func New(key *keys.PrivateKey, endpoint string, opts ...Option) (*Client, error)
|
|||
endpoints := append(cfg.extraEndpoints, endpoint)
|
||||
|
||||
return &Client{
|
||||
cache: initClientCache(),
|
||||
multiClient: &multiClient{
|
||||
cfg: *cfg,
|
||||
account: wallet.NewAccountFromPrivateKey(key),
|
||||
endpoints: endpoints,
|
||||
clients: make(map[string]*Client, len(endpoints)),
|
||||
cfg: *cfg,
|
||||
account: wallet.NewAccountFromPrivateKey(key),
|
||||
endpoints: endpoints,
|
||||
clients: make(map[string]*Client, len(endpoints)),
|
||||
sharedCache: initClientCache(),
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue