Skip to content

Commit cc10155

Browse files
Potential fix for pull request finding 'Constant condition'
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
1 parent 95384fb commit cc10155

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tilework.core/Providers/LoadBalancingProviders/HAProxy/Mappers/HAProxyConfigurationProfile.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,8 @@ public HAProxyConfigurationProfile()
2828
dest.Mode = src.Type == LoadBalancerType.APPLICATION ? Mode.HTTP : Mode.TCP;
2929
if (dest.Mode == Mode.HTTP)
3030
MapHttpLoadBalancerRules(src, dest, context);
31-
else if (dest.Mode == Mode.TCP)
32-
MapTcpLoadBalancerRules(src, dest, context);
3331
else
34-
throw new NotSupportedException($"Unsupported HAProxy frontend mode: {dest.Mode}");
32+
MapTcpLoadBalancerRules(src, dest, context);
3533
});
3634

3735
CreateMap<LoadBalancer, PortType>()

0 commit comments

Comments
 (0)