consul/connect: copy bind address map if empty

This parameter is now supposed to be non-nil even if
empty, and the Copy method should also maintain that
invariant.
This commit is contained in:
Seth Hoenig 2021-01-25 10:33:50 -06:00
parent 1ad219c441
commit 720780992c
1 changed files with 1 additions and 1 deletions

View File

@ -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
}