fix loop for copy

This commit is contained in:
Cyrille Nofficial 2024-03-12 21:59:04 +01:00
parent 9fb0843d80
commit 13d446f194

View File

@ -202,7 +202,8 @@ func (c *Controller) Objects() []*events.Object {
defer c.muObjects.RUnlock()
res := make([]*events.Object, 0, len(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)
return res