Fixed a few tautological condition mistakes (#6177)
None of these changes should have any side-effects. They're merely fixing tautological mistakes.
This commit is contained in:
parent
d1426767f6
commit
877bfd280b
|
@ -67,7 +67,7 @@ func (probe *GrpcHealthProbe) Check() error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if response == nil || (response != nil && response.Status != hv1.HealthCheckResponse_SERVING) {
|
||||
if response == nil || response.Status != hv1.HealthCheckResponse_SERVING {
|
||||
return ErrGRPCUnhealthy
|
||||
}
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ func (r *aclTokenReplicator) DeleteLocalBatch(srv *Server, batch []string) error
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if respErr, ok := resp.(error); ok && err != nil {
|
||||
if respErr, ok := resp.(error); ok {
|
||||
return respErr
|
||||
}
|
||||
return nil
|
||||
|
@ -119,7 +119,7 @@ func (r *aclTokenReplicator) UpdateLocalBatch(ctx context.Context, srv *Server,
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if respErr, ok := resp.(error); ok && err != nil {
|
||||
if respErr, ok := resp.(error); ok {
|
||||
return respErr
|
||||
}
|
||||
|
||||
|
@ -202,7 +202,7 @@ func (r *aclPolicyReplicator) DeleteLocalBatch(srv *Server, batch []string) erro
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if respErr, ok := resp.(error); ok && err != nil {
|
||||
if respErr, ok := resp.(error); ok {
|
||||
return respErr
|
||||
}
|
||||
return nil
|
||||
|
|
|
@ -60,7 +60,6 @@ func (s *Server) makeAppCluster(cfgSnap *proxycfg.ConfigSnapshot) (*envoy.Cluste
|
|||
return makeClusterFromUserConfig(cfg.LocalClusterJSON)
|
||||
}
|
||||
|
||||
if c == nil {
|
||||
addr := cfgSnap.Proxy.LocalServiceAddress
|
||||
if addr == "" {
|
||||
addr = "127.0.0.1"
|
||||
|
@ -85,7 +84,6 @@ func (s *Server) makeAppCluster(cfgSnap *proxycfg.ConfigSnapshot) (*envoy.Cluste
|
|||
if cfg.Protocol == "http2" || cfg.Protocol == "grpc" {
|
||||
c.Http2ProtocolOptions = &envoycore.Http2ProtocolOptions{}
|
||||
}
|
||||
}
|
||||
|
||||
return c, err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue