Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
cds: Remove conditional always evaluating to true (#2261)
Browse files Browse the repository at this point in the history
Signed-off-by: Delyan Raychev <delyan.raychev@microsoft.com>
  • Loading branch information
draychev authored Jan 6, 2021
1 parent 6c8eac7 commit 4605068
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions pkg/envoy/cds/thresholds.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,11 @@ func makeThresholds(maxConnections *uint32) []*xds_cluster.CircuitBreakers_Thres
return nil
}

threshold := &xds_cluster.CircuitBreakers_Thresholds{}

if maxConnections != nil {
threshold.MaxConnections = &wrappers.UInt32Value{
Value: *maxConnections,
}
}

return []*xds_cluster.CircuitBreakers_Thresholds{
threshold,
{
MaxConnections: &wrappers.UInt32Value{
Value: *maxConnections,
},
},
}
}

0 comments on commit 4605068

Please sign in to comment.