[#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

@ -22,7 +22,10 @@ func (h *remoteHeader) head(ctx context.Context, prm *Prm, handler func(*object.
return errors.Wrapf(err, "(%T) could not receive private key", h)
}
addr := h.node.NetAddr()
addr, err := h.node.NetAddr()
if err != nil {
return err
}
c, err := client.New(key,
client.WithAddress(addr),