Skip to content

Commit

Permalink
Merge pull request #14 from kube-logging/szp/disable-listening-port
Browse files Browse the repository at this point in the history
Fix always listening on port 7357
  • Loading branch information
pepov authored Aug 30, 2023
2 parents b6483a5 + 4d2bbf8 commit 452150f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ func main() {
}

events.Add(events.OnStart())
info.Printf("listening on port:%v\n", *port)
info.Println(http.ListenAndServe(fmt.Sprintf(":%v", *port), httpApi))
if *port != 0 {
info.Printf("listening on port:%v\n", *port)
info.Println(http.ListenAndServe(fmt.Sprintf(":%v", *port), httpApi))
} else {
info.Printf("listening port disabled\n")
}
}

0 comments on commit 452150f

Please sign in to comment.