From d0d64817590d38d182faeb0e040861d3d3cb9f3b Mon Sep 17 00:00:00 2001 From: Sebastien Douheret Date: Tue, 5 Dec 2017 11:02:56 +0100 Subject: Fixed XDS Server connection lost and reconnection. --- lib/agent/projects.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lib/agent/projects.go') 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 } -- cgit 1.2.3-korg