Fix race condition
This commit is contained in:
parent
f3a6ee7a45
commit
31757a68a9
|
@ -60,6 +60,7 @@ func (m *Manager) initializeFromRemoteSource(ctx context.Context, client remote.
|
||||||
pool := workerpool.New(runtime.NumCPU())
|
pool := workerpool.New(runtime.NumCPU())
|
||||||
log.Debugf("using %d workerpools to instantiate server instances", runtime.NumCPU())
|
log.Debugf("using %d workerpools to instantiate server instances", runtime.NumCPU())
|
||||||
for _, data := range servers {
|
for _, data := range servers {
|
||||||
|
data := data
|
||||||
pool.Submit(func() {
|
pool.Submit(func() {
|
||||||
// Parse the json.RawMessage into an expected struct value. We do this here so that a single broken
|
// Parse the json.RawMessage into an expected struct value. We do this here so that a single broken
|
||||||
// server does not cause the entire boot process to hang, and allows us to show more useful error
|
// server does not cause the entire boot process to hang, and allows us to show more useful error
|
||||||
|
|
Loading…
Reference in New Issue
Block a user