mirror of https://github.com/status-im/consul.git
Remove an unnecessary else
This commit is contained in:
parent
4b8b2a4291
commit
a04cefaa28
|
@ -658,14 +658,14 @@ func (a *Agent) listenAndServeGRPC() error {
|
||||||
AuthCheckFrequency: xds.DefaultAuthCheckFrequency,
|
AuthCheckFrequency: xds.DefaultAuthCheckFrequency,
|
||||||
}
|
}
|
||||||
|
|
||||||
var err error
|
tlsConfig := a.tlsConfigurator
|
||||||
if a.config.HTTPSPort > 0 {
|
// gRPC uses the same TLS settings as the HTTPS API. If HTTPS is not enabled
|
||||||
// gRPC uses the same TLS settings as the HTTPS API. If HTTPS is
|
// then gRPC should not use TLS.
|
||||||
// enabled then gRPC will require HTTPS as well.
|
if a.config.HTTPSPort <= 0 {
|
||||||
a.grpcServer, err = xdsServer.GRPCServer(a.tlsConfigurator)
|
tlsConfig = nil
|
||||||
} else {
|
|
||||||
a.grpcServer, err = xdsServer.GRPCServer(nil)
|
|
||||||
}
|
}
|
||||||
|
var err error
|
||||||
|
a.grpcServer, err = xdsServer.GRPCServer(tlsConfig)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue