Skip to content

Commit

Permalink
consul/connect: copy bind address map if empty
Browse files Browse the repository at this point in the history
This parameter is now supposed to be non-nil even if
empty, and the Copy method should also maintain that
invariant.
  • Loading branch information
shoenig committed Jan 25, 2021
1 parent 6730de3 commit 10a1eb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nomad/structs/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -1403,7 +1403,7 @@ func (p *ConsulGatewayProxy) Copy() *ConsulGatewayProxy {
}

func (p *ConsulGatewayProxy) copyBindAddresses() map[string]*ConsulGatewayBindAddress {
if len(p.EnvoyGatewayBindAddresses) == 0 {
if p.EnvoyGatewayBindAddresses == nil {
return nil
}

Expand Down

0 comments on commit 10a1eb2

Please sign in to comment.