Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Nomad
Commits
2e8cf3dd
Unverified
Commit
2e8cf3dd
authored
4 years ago
by
Nick Ethier
Browse files
Options
Download
Email Patches
Plain Diff
consul: fix logic for blank address
parent
c00b0e68
Branches unavailable
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
command/agent/consul/service_client.go
+2
-1
command/agent/consul/service_client.go
with
2 additions
and
1 deletion
+2
-1
command/agent/consul/service_client.go
+
2
-
1
View file @
2e8cf3dd
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help