service/FaceSdkService.go
@@ -122,7 +122,8 @@ go func() { for { select { case <-time.Tick(time.Second*10): case <-time.Tick(time.Second*5): fmt.Println("倒计时结束") ch <- nil wg.Done() return @@ -131,11 +132,15 @@ fmt.Println("faceFea got!!!") ch <- feas return } else { fmt.Println("尚未拿到fea") } } } }() fmt.Println("wa.Wait") wg.Wait() fmt.Println("<-ch") msg := <- ch if msg != nil { return msg,nil