Commit 7a875506 authored by Geoff Simmons's avatar Geoff Simmons

Bugfix a potential nil reference.

parent e1675758
...@@ -625,7 +625,9 @@ func (vc *Controller) Update(svcKey string, spec vcl.Spec, addrs []vcl.Address, ...@@ -625,7 +625,9 @@ func (vc *Controller) Update(svcKey string, spec vcl.Spec, addrs []vcl.Address,
instances: make([]*varnishInst, len(addrs)), instances: make([]*varnishInst, len(addrs)),
} }
for i, addr := range addrs { for i, addr := range addrs {
svc.instances[i].addr = addr.String() svc.instances[i] = &varnishInst{
addr: addr.String(),
}
} }
vc.svcs[svcKey] = svc vc.svcs[svcKey] = svc
svcsGauge.Inc() svcsGauge.Inc()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment