1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-01-05 10:20:53 +02:00

fix undefined: err (#2181)

This commit is contained in:
qm012 2021-06-17 18:11:38 +08:00 committed by GitHub
parent 4deeaff8ad
commit 08216ccf31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {