Skip to content

Commit

Permalink
check if port is not zero
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishek9686 committed Jan 22, 2025
1 parent 30aa18e commit efb41f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion servercfg/serverconf.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit efb41f1

Please sign in to comment.