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
|
@ -15,6 +15,8 @@ type multiClient struct {
|
|||
|
||||
sharedNotary *notary // notary config needed for single client construction
|
||||
|
||||
sharedCache cache
|
||||
|
||||
endpoints []string
|
||||
clientsMtx sync.Mutex
|
||||
clients map[string]*Client
|
||||
|
@ -41,6 +43,7 @@ func (x *multiClient) createForAddress(addr string) (*Client, error) {
|
|||
sCli.notary = x.sharedNotary
|
||||
|
||||
c := &Client{
|
||||
cache: x.sharedCache,
|
||||
singleClient: sCli,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue