[#1961] network/cache: Do not return nil client
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
parent
a4573d5026
commit
926830bb9c
1 changed files with 2 additions and 1 deletions
3
pkg/network/cache/multi.go
vendored
3
pkg/network/cache/multi.go
vendored
|
@ -252,7 +252,8 @@ func (x *multiClient) client(addr network.Address) (clientcore.Client, error) {
|
||||||
|
|
||||||
c, cached = x.clients[strAddr]
|
c, cached = x.clients[strAddr]
|
||||||
if !cached {
|
if !cached {
|
||||||
c, err := x.createForAddress(addr)
|
var err error
|
||||||
|
c, err = x.createForAddress(addr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue