Fix bug where the defensive copy loses the computed leaf paths. (#401)
This commit is contained in:
parent
c72b45fab4
commit
84cb3b705e
@ -88,9 +88,9 @@ type ParamsWithMutex struct {
|
|||||||
// CopyParams returns a defensive copy of the Params
|
// CopyParams returns a defensive copy of the Params
|
||||||
func (p *ParamsWithMutex) CopyParams() Params {
|
func (p *ParamsWithMutex) CopyParams() Params {
|
||||||
p.RLock()
|
p.RLock()
|
||||||
defer p.RUnlock()
|
|
||||||
|
|
||||||
copy := p.Params.Copy()
|
copy := p.Params.Copy()
|
||||||
|
p.RUnlock()
|
||||||
|
|
||||||
copy.ComputeWatchedAddressesLeafPaths()
|
copy.ComputeWatchedAddressesLeafPaths()
|
||||||
return copy
|
return copy
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user