Skip to content

Commit

Permalink
add warning for failure to parse IP out of remote multiaddr
Browse files Browse the repository at this point in the history
  • Loading branch information
vyzo committed Sep 7, 2020
1 parent 14d1a35 commit 1d21536
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions peer_gater.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 1d21536

Please sign in to comment.