Makes a detached copy of the tags when doing the override.

pull/1942/head
James Phillips 9 years ago
parent a885f1bdff
commit f541acb0ec

@ -394,9 +394,12 @@ func (l *localState) setSyncState() error {
continue continue
} }
// If our definition is different, we need to update it // If our definition is different, we need to update it. Make a
// copy so that we don't retain a pointer to any actual state
// store info for in-memory RPCs.
if existing.EnableTagOverride { if existing.EnableTagOverride {
existing.Tags = service.Tags existing.Tags = make([]string, len(service.Tags))
copy(existing.Tags, service.Tags)
} }
equal := existing.IsSame(service) equal := existing.IsSame(service)
l.serviceStatus[id] = syncStatus{inSync: equal} l.serviceStatus[id] = syncStatus{inSync: equal}

Loading…
Cancel
Save