Skip to content

Commit 1c961ba

Browse files
committed
fix: don't check upper bound of 16 bit int
1 parent 94785f1 commit 1c961ba

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/cmd/kube-router.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func (kr *KubeRouter) Run() error {
107107
wg.Add(1)
108108
go hc.RunCheck(healthChan, stopCh, &wg)
109109

110-
if (kr.Config.MetricsPort > 0) && (kr.Config.MetricsPort <= 65535) {
110+
if kr.Config.MetricsPort > 0 {
111111
kr.Config.MetricsEnabled = true
112112
mc, err := metrics.NewMetricsController(kr.Client, kr.Config)
113113
if err != nil {

pkg/healthcheck/health_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func (hc *HealthController) RunServer(stopCh <-chan struct{}, wg *sync.WaitGroup
148148
defer wg.Done()
149149
srv := &http.Server{Addr: ":" + strconv.Itoa(int(hc.HealthPort)), Handler: http.DefaultServeMux}
150150
http.HandleFunc("/healthz", hc.Handler)
151-
if (hc.Config.HealthPort > 0) && (hc.Config.HealthPort <= 65535) {
151+
if hc.Config.HealthPort > 0 {
152152
hc.HTTPEnabled = true
153153
go func() {
154154
if err := srv.ListenAndServe(); err != nil {

0 commit comments

Comments
 (0)