1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-29 09:34:03 +08:00

Merge pull request #285 from jbenet/bugfix/284

prevent NAT check if given nil multiaddr
This commit is contained in:
Juan Batiz-Benet
2014-11-08 18:33:04 -08:00

View File

@ -119,7 +119,11 @@ func (s *Swarm) connSetup(c conn.Conn) (conn.Conn, error) {
} }
// check for nats. you know, just in case. // check for nats. you know, just in case.
s.checkNATWarning(h3result.LocalObservedAddress) if h3result.LocalObservedAddress != nil {
s.checkNATWarning(h3result.LocalObservedAddress)
} else {
log.Warningf("Received nil observed address from %s", c.RemotePeer())
}
// add to conns // add to conns
s.connsLock.Lock() s.connsLock.Lock()