From 44b1fba8c8e738774992a874018373f042bc1681 Mon Sep 17 00:00:00 2001 From: "suguo.yao" Date: Thu, 16 Sep 2021 14:03:34 +0800 Subject: [PATCH] bug for sync.Done --- grpc/grpc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grpc/grpc.go b/grpc/grpc.go index b8e6e1e..266732e 100644 --- a/grpc/grpc.go +++ b/grpc/grpc.go @@ -64,12 +64,12 @@ func Start() { } defer lis.Close() conf.Port = lis.Addr().(*net.TCPAddr).Port + wg.Done() log.Printf("starting grpc service on %s:%d", addr.IP, conf.Port) err = rpc.Serve(lis) if err != nil { log.Fatal("fail to open microservice: ", err) } - wg.Done() }() wg.Wait() }