put missing if block back causing all intercepts to be mislabeled as already mapped

This commit is contained in:
dovholuknf
2020-11-02 07:43:43 -05:00
parent e92a223615
commit a0f0127e80
+5 -1
View File
@@ -94,7 +94,11 @@ func (dns *dnsImpl) RegisterService(svcId string, dnsNameToReg string, port uint
//name and register it in dns, obtain an ip and all that...
ip := net.ParseIP(dnsNameToReg)
icept := intercept{isIp: false, port: port}
icept := intercept{isIp: false, host:dnsNameToReg, port: port}
if ip != nil {
icept.host = ip.String()
icept.isIp = true
}
key := icept.String()
log.Infof("adding DNS for %s. service name %s@%s. is ip: %t", dnsNameToReg, svcName, key, icept.isIp)