1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-27 16:07:42 +08:00

Clear up naming around zero address

This commit is contained in:
Jeromy
2014-11-03 20:42:40 +00:00
parent 402fdd2db9
commit 05817373d0
2 changed files with 2 additions and 2 deletions

View File

@ -128,7 +128,7 @@ func (s *Swarm) Dial(peer peer.Peer) (conn.Conn, error) {
Peerstore: s.peers,
}
// If we are attempting to connect to a loopback addr, fail out early
// If we are attempting to connect to the zero addr, fail out early
raddr := peer.NetAddress("tcp")
if raddr == nil {
return nil, fmt.Errorf("No remote address for network tcp")

View File

@ -115,7 +115,7 @@ func GetenvBool(name string) bool {
// IsLoopbackAddr returns whether or not the ip portion of the passed in multiaddr
// string is a loopback address
func IsLoopbackAddr(addr string) bool {
loops := []string{"/ip4/127.0.0.1", "/ip6/::1", "/ip4/0.0.0.0"}
loops := []string{"/ip4/127.0.0.1", "/ip6/::1"}
for _, loop := range loops {
if strings.HasPrefix(addr, loop) {
return true