add warning for failure to parse IP out of remote multiaddr

This commit is contained in:
vyzo 2020-09-04 14:51:09 +03:00
parent 14d1a35e0c
commit 1d21536720
1 changed files with 1 additions and 0 deletions

View File

@ -271,6 +271,7 @@ func (pg *peerGater) getPeerIP(p peer.ID) string {
remote := c.RemoteMultiaddr()
ip, err := manet.ToIP(remote)
if err != nil {
log.Warnf("error determining IP for remote peer in %s: %s", remote, err)
return "<unknown>"
}
return ip.String()