diff options
author | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2017-12-05 11:02:56 +0100 |
---|---|---|
committer | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2017-12-05 11:02:56 +0100 |
commit | d0d64817590d38d182faeb0e040861d3d3cb9f3b (patch) | |
tree | d96a612511e10375aaa4c6ed8552c6c813b71548 /lib/agent/projects.go | |
parent | f75d24ca885690289c16adeac0e5c5e7bb56e36c (diff) |
Fixed XDS Server connection lost and reconnection.
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 } |