From c8919e9237361b81902e07d9f8ee374073e61fff Mon Sep 17 00:00:00 2001 From: atomstaker Date: Fri, 22 Sep 2023 15:21:09 +0800 Subject: [PATCH] fixed default value checking issue for metric port --- config/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/config.go b/config/config.go index e42c113..56141f1 100644 --- a/config/config.go +++ b/config/config.go @@ -130,7 +130,7 @@ type MetricsConfig struct { } func (cfg *MetricsConfig) Validate() { - if cfg.Port <= 0 || cfg.Port > 65535 { + if cfg.Port < 0 || cfg.Port > 65535 { panic("port should be within (0, 65535]") } }