From 08216ccf3148730c63c0ea69fccfcd57187a4d41 Mon Sep 17 00:00:00 2001 From: qm012 <67568757+qm012@users.noreply.github.com> Date: Thu, 17 Jun 2021 18:11:38 +0800 Subject: [PATCH] fix undefined: err (#2181) --- plugins/server/grpc/grpc.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/server/grpc/grpc.go b/plugins/server/grpc/grpc.go index 3a040b5c..67053705 100644 --- a/plugins/server/grpc/grpc.go +++ b/plugins/server/grpc/grpc.go @@ -842,12 +842,14 @@ func (g *grpcServer) Start() error { config := g.Options() // micro: config.Transport.Listen(config.Address) - var ts net.Listener + var ( + ts net.Listener + err error + ) if l := g.getListener(); l != nil { ts = l } else { - var err error // check the tls config for secure connect if tc := config.TLSConfig; tc != nil {