From f2194c8a93eff2b72c6c2dc2e335b0b200067eca Mon Sep 17 00:00:00 2001 From: JungYong KIM Date: Wed, 25 Sep 2019 16:55:44 +0900 Subject: [PATCH 1/2] Add Sync up of Discovery result Signed-off-by: JungYong KIM --- src/controller/discoverymgr/discovery.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/controller/discoverymgr/discovery.go b/src/controller/discoverymgr/discovery.go index d7d4f6a5..b6ff0c88 100755 --- a/src/controller/discoverymgr/discovery.go +++ b/src/controller/discoverymgr/discovery.go @@ -84,6 +84,11 @@ func (discoveryImpl) StartDiscovery(UUIDpath string, platform string, executionT go detectNetworkChgRoutine() + go func() { + time.Sleep(time.Minute) + activeDiscovery() + }() + return } From 8ca939f228759648f8ffad8922c1c0ea0290cfc5 Mon Sep 17 00:00:00 2001 From: JungYong KIM Date: Wed, 25 Sep 2019 17:16:27 +0900 Subject: [PATCH 2/2] Fix bugs Signed-off-by: JungYong KIM --- src/controller/discoverymgr/discovery.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/controller/discoverymgr/discovery.go b/src/controller/discoverymgr/discovery.go index b6ff0c88..787beae4 100755 --- a/src/controller/discoverymgr/discovery.go +++ b/src/controller/discoverymgr/discovery.go @@ -85,8 +85,10 @@ func (discoveryImpl) StartDiscovery(UUIDpath string, platform string, executionT go detectNetworkChgRoutine() go func() { - time.Sleep(time.Minute) - activeDiscovery() + for { + time.Sleep(time.Minute) + activeDiscovery() + } }() return