fixed variable initialization

This commit is contained in:
AndrewChubatiuk 2021-02-08 12:59:17 +02:00
parent 78465bbd23
commit 844ac16900

View file

@ -866,7 +866,7 @@ func (c *ServiceClient) serviceRegs(ops *operations, service *structs.Service, w
}
// newConnect returns (nil, nil) if there's no Connect-enabled service.
sidecarId = id + sidecarSuffix
sidecarId := id + sidecarSuffix
connect, err := newConnect(sidecarId, service.Name, service.Connect, workload.Networks)
if err != nil {
return nil, fmt.Errorf("invalid Consul Connect configuration for service %q: %v", service.Name, err)