add time.Duration at waitServer 31/206531/1
authorwansuyoo <wansu.yoo@samsung.com>
Tue, 21 May 2019 03:39:58 +0000 (12:39 +0900)
committerwansuyoo <wansu.yoo@samsung.com>
Tue, 21 May 2019 03:39:58 +0000 (12:39 +0900)
issue at CPU occupation because of discoverymgr
it is waiting network connection without yield

Change-Id: I7696f6054e167872d4228f59cfeb76c41c95e95b
Signed-off-by: wansuyoo <wansu.yoo@samsung.com>
src/discoverymgr/discovery_execution.go

index 78dd831..3423f3b 100755 (executable)
@@ -85,14 +85,13 @@ func waitServer() {
        //but gServer is not initialized because InitDiscovery go routine
        for {
                if IsNilServer() == true {
-                       time.Sleep(0)
+                       time.Sleep(time.Duration(1) * time.Second)
                } else {
                        break
                }
        }
 }
 
-
 // func discoveryBGR() {
 //     discoveryPeriod := maxPollingTime
 //     // discoveryPeriod := 3 * 1000