Clear up naming around zero address
Jeromy committed
Nov 3, 2014 at 20:42 UTC
05817373d03f809dab1a9a05a8e7af3232b02354
2 files changed
+2
-2
net/swarm/swarm.go
+1
-1
@@ -128,7 +128,7 @@ func (s *Swarm) Dial(peer peer.Peer) (conn.Conn, error) {
128
Peerstore: s.peers,
129
}
130
131
- // If we are attempting to connect to a loopback addr, fail out early
131
+ // If we are attempting to connect to the zero addr, fail out early
132
raddr := peer.NetAddress("tcp")
133
if raddr == nil {
134
return nil, fmt.Errorf("No remote address for network tcp")
util/util.go
+1
-1
@@ -115,7 +115,7 @@ func GetenvBool(name string) bool {
115
// IsLoopbackAddr returns whether or not the ip portion of the passed in multiaddr
116
// string is a loopback address
117
func IsLoopbackAddr(addr string) bool {
118
- loops := []string{"/ip4/127.0.0.1", "/ip6/::1", "/ip4/0.0.0.0"}
118
+ loops := []string{"/ip4/127.0.0.1", "/ip6/::1"}
119
for _, loop := range loops {
120
if strings.HasPrefix(addr, loop) {
121
return true