Unverified Commit 2e8cf3dd authored by Nick Ethier's avatar Nick Ethier
Browse files

consul: fix logic for blank address

parent c00b0e68
Branches unavailable
No related merge requests found
Showing with 2 additions and 1 deletion
+2 -1
......@@ -1476,7 +1476,7 @@ func getAddress(addrMode, portLabel string, networks structs.Networks, driverNet
mapping, ok := ports.Get(portLabel)
if !ok {
ip, port := networks.Port(portLabel)
if ip != "" && port > 0 {
if port > 0 {
return ip, port, nil
}
......@@ -1493,6 +1493,7 @@ func getAddress(addrMode, portLabel string, networks structs.Networks, driverNet
}
// A number was given which will use the Consul agent's address and the given port
// Returning a blank string as an address will use the Consul agent's address
return "", port, nil
}
return mapping.HostIP, mapping.Value, nil
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment