Explorar o código

check if port is not zero

abhishek9686 hai 7 meses
pai
achega
efb41f14fa
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      servercfg/serverconf.go

+ 1 - 1
servercfg/serverconf.go

@@ -664,7 +664,7 @@ func GetMetricsPort() int {
 	if os.Getenv("METRICS_PORT") != "" {
 		pStr := os.Getenv("METRICS_PORT")
 		pInt, err := strconv.Atoi(pStr)
-		if err == nil {
+		if err == nil && pInt != 0 {
 			p = pInt
 		}
 	}