From 74780f08bf854dc7b08b62816dfcdad1246b73d5 Mon Sep 17 00:00:00 2001 From: Seth Hoenig Date: Mon, 25 Jan 2021 10:33:50 -0600 Subject: [PATCH] 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. --- nomad/structs/services.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nomad/structs/services.go b/nomad/structs/services.go index 073577b3c..63107654a 100644 --- a/nomad/structs/services.go +++ b/nomad/structs/services.go @@ -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 }