[#43] pkg/network: Do not panic at multiaddr to net.Addr conversion

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2020-09-24 10:37:42 +03:00
parent 8585e147d0
commit f930993e3a
7 changed files with 27 additions and 10 deletions

View file

@ -38,7 +38,10 @@ func (t *remoteTarget) Close() (*transformer.AccessIdentifiers, error) {
return nil, errors.Wrapf(err, "(%T) could not receive private key", t)
}
addr := t.addr.NetAddr()
addr, err := t.addr.NetAddr()
if err != nil {
return nil, err
}
c, err := client.New(key,
client.WithAddress(addr),