[BUGFIX] write during map interation

This commit is contained in:
Geno 2017-11-22 12:58:29 +01:00 committed by GitHub
parent 136b42b468
commit 395fb46fde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,6 +21,9 @@ func (f filterConfig) filtering(nodesOrigin *runtime.Nodes) *runtime.Nodes {
f.NoOwner(), f.NoOwner(),
} }
nodesOrigin.Lock()
defer nodesOrigin.Unlock()
for _, nodeOrigin := range nodesOrigin.List { for _, nodeOrigin := range nodesOrigin.List {
//maybe cloning of this object is better? //maybe cloning of this object is better?
node := nodeOrigin node := nodeOrigin