diff options
Diffstat (limited to 'lib/agent/projects.go')
-rw-r--r-- | lib/agent/projects.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/agent/projects.go b/lib/agent/projects.go index a0b641a..a2d8fe1 100644 --- a/lib/agent/projects.go +++ b/lib/agent/projects.go @@ -248,10 +248,12 @@ func (p *Projects) createUpdate(newF xaapiv1.ProjectConfig, create bool, initial // Force sync after creation // (need to defer to be sure that WS events will arrive after HTTP creation reply) - go func() { - time.Sleep(time.Millisecond * 500) - fld.Sync() - }() + if create { + go func() { + time.Sleep(time.Millisecond * 500) + fld.Sync() + }() + } return newPrj, nil } |