Fix bug where the defensive copy loses the computed leaf paths.

This commit is contained in:
Thomas E Lackey 2023-07-21 18:45:46 -05:00
parent c72b45fab4
commit 7f57cec951

View File

@ -88,9 +88,9 @@ type ParamsWithMutex struct {
// CopyParams returns a defensive copy of the Params
func (p *ParamsWithMutex) CopyParams() Params {
p.RLock()
defer p.RUnlock()
copy := p.Params.Copy()
p.RUnlock()
copy.ComputeWatchedAddressesLeafPaths()
return copy
}