fix loop for copy
This commit is contained in:
parent
9fb0843d80
commit
13d446f194
@ -202,7 +202,8 @@ func (c *Controller) Objects() []*events.Object {
|
|||||||
defer c.muObjects.RUnlock()
|
defer c.muObjects.RUnlock()
|
||||||
res := make([]*events.Object, 0, len(c.objects))
|
res := make([]*events.Object, 0, len(c.objects))
|
||||||
for _, o := range c.objects {
|
for _, o := range c.objects {
|
||||||
res = append(res, o)
|
oCpy := o
|
||||||
|
res = append(res, oCpy)
|
||||||
}
|
}
|
||||||
zap.S().Debugf("copy object from %v to %v", c.objects, res)
|
zap.S().Debugf("copy object from %v to %v", c.objects, res)
|
||||||
return res
|
return res
|
||||||
|
Loading…
Reference in New Issue
Block a user