mirror of
https://github.com/status-im/consul.git
synced 2025-02-02 00:46:43 +00:00
Fix race with tags (#12041)
This commit is contained in:
parent
209d03c267
commit
98ea6d1cf1
@ -1086,8 +1086,9 @@ func (l *State) updateSyncState() error {
|
||||
// copy so that we don't retain a pointer to any actual state
|
||||
// store info for in-memory RPCs.
|
||||
if ls.Service.EnableTagOverride {
|
||||
ls.Service.Tags = make([]string, len(rs.Tags))
|
||||
copy(ls.Service.Tags, rs.Tags)
|
||||
tags := make([]string, len(rs.Tags))
|
||||
copy(tags, rs.Tags)
|
||||
ls.Service.Tags = tags
|
||||
}
|
||||
|
||||
// Merge any tagged addresses with the consul- prefix (set by the server)
|
||||
|
Loading…
x
Reference in New Issue
Block a user