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

@ -24,7 +24,10 @@ func (s *remoteStream) stream(ctx context.Context, ch chan<- []*object.ID) error
return errors.Wrapf(err, "(%T) could not receive private key", s)
}
addr := s.addr.NetAddr()
addr, err := s.addr.NetAddr()
if err != nil {
return err
}
c, err := client.New(key,
client.WithAddress(addr),