add warning for failure to parse IP out of remote multiaddr
This commit is contained in:
parent
14d1a35e0c
commit
1d21536720
|
@ -271,6 +271,7 @@ func (pg *peerGater) getPeerIP(p peer.ID) string {
|
||||||
remote := c.RemoteMultiaddr()
|
remote := c.RemoteMultiaddr()
|
||||||
ip, err := manet.ToIP(remote)
|
ip, err := manet.ToIP(remote)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
log.Warnf("error determining IP for remote peer in %s: %s", remote, err)
|
||||||
return "<unknown>"
|
return "<unknown>"
|
||||||
}
|
}
|
||||||
return ip.String()
|
return ip.String()
|
||||||
|
|
Loading…
Reference in New Issue