mirror of
https://github.com/containous/traefik.git
synced 2025-01-24 02:04:03 +03:00
Be certain to clear our marshalled representation before reloading it
This commit is contained in:
parent
a941739f8a
commit
9db12374ea
@ -199,6 +199,10 @@ func (d *Datastore) get() *Metadata {
|
||||
func (d *Datastore) Load() (Object, error) {
|
||||
d.localLock.Lock()
|
||||
defer d.localLock.Unlock()
|
||||
|
||||
// clear Object first, as mapstructure's decoder doesn't have ZeroFields set to true for merging purposes
|
||||
d.meta.Object = d.meta.Object[:0]
|
||||
|
||||
err := d.kv.LoadConfig(d.meta)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Loading…
x
Reference in New Issue
Block a user