From 2f4e80261bce26b77fdb85fa1ab5657032852225 Mon Sep 17 00:00:00 2001 From: Felix Hao Date: Tue, 7 May 2019 17:40:01 +0800 Subject: [PATCH] fix block in warden client init register discovery (#79) * fix block in warden client init register discovery * rm empty tab --- pkg/net/rpc/warden/client.go | 4 ---- tool/kratos/template.go | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/pkg/net/rpc/warden/client.go b/pkg/net/rpc/warden/client.go index 8f54f02e4..f8b2395e5 100644 --- a/pkg/net/rpc/warden/client.go +++ b/pkg/net/rpc/warden/client.go @@ -43,10 +43,6 @@ var ( _defaultClient *Client ) -func init() { - resolver.Register(discovery.New(nil)) -} - func baseMetadata() metadata.MD { gmd := metadata.MD{nmd.Caller: []string{env.AppID}} if env.Color != "" { diff --git a/tool/kratos/template.go b/tool/kratos/template.go index b7562c676..5abc298e8 100644 --- a/tool/kratos/template.go +++ b/tool/kratos/template.go @@ -100,7 +100,7 @@ func main() { ctx, cancel := context.WithTimeout(context.Background(), 35*time.Second) if err := grpcSrv.Shutdown(ctx); err != nil { log.Error("grpcSrv.Shutdown error(%v)", err) - } // grpc + } if err := httpSrv.Shutdown(ctx); err != nil { log.Error("httpSrv.Shutdown error(%v)", err) }