1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-01-17 17:44:30 +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() config := g.Options()
// micro: config.Transport.Listen(config.Address) // micro: config.Transport.Listen(config.Address)
var ts net.Listener var (
ts net.Listener
err error
)
if l := g.getListener(); l != nil { if l := g.getListener(); l != nil {
ts = l ts = l
} else { } else {
var err error
// check the tls config for secure connect // check the tls config for secure connect
if tc := config.TLSConfig; tc != nil { if tc := config.TLSConfig; tc != nil {