Skip to content

Commit

Permalink
Merge pull request #1942 from hashicorp/b-tag-sync
Browse files Browse the repository at this point in the history
Makes a detached copy of the tags when doing the override.
  • Loading branch information
slackpad committed Apr 11, 2016
2 parents a885f1b + f541acb commit 04b0c31
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions command/agent/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,12 @@ func (l *localState) setSyncState() error {
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 {
existing.Tags = service.Tags
existing.Tags = make([]string, len(service.Tags))
copy(existing.Tags, service.Tags)
}
equal := existing.IsSame(service)
l.serviceStatus[id] = syncStatus{inSync: equal}
Expand Down

0 comments on commit 04b0c31

Please sign in to comment.