[#1961] network/cache: Do not return nil client

Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
Evgenii Stratonikov 2022-10-24 17:49:59 +03:00 committed by fyrchik
parent a4573d5026
commit 926830bb9c

View file

@ -252,7 +252,8 @@ func (x *multiClient) client(addr network.Address) (clientcore.Client, error) {
c, cached = x.clients[strAddr]
if !cached {
c, err := x.createForAddress(addr)
var err error
c, err = x.createForAddress(addr)
if err != nil {
return nil, err
}