Skip to content

Commit

Permalink
Merge pull request #110 from hidevopsio/test-concurrent
Browse files Browse the repository at this point in the history
fixes concurrent issue
  • Loading branch information
john-deng authored Jul 6, 2020
2 parents 26e9267 + d79c135 commit 996d24e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/system/property_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
"os"
"path/filepath"
"strings"
"sync"
)

const ( appProfilesInclude = "app.profiles.include")
Expand All @@ -47,6 +48,7 @@ type propertyBuilder struct {
defaultProperties map[string]interface{}
profiles []string
merge bool
sync.Mutex
}


Expand Down Expand Up @@ -326,6 +328,9 @@ func (b *propertyBuilder) SetProperty(name string, val interface{}) Builder {
}

func (b *propertyBuilder) SetDefaultProperty(name string, val interface{}) Builder {
b.Lock()
b.SetDefault(name, val)
b.Unlock()

return b
}

0 comments on commit 996d24e

Please sign in to comment.