Skip to content

Commit

Permalink
perf: http-port conflicts when more than 1 instance running on a machine
Browse files Browse the repository at this point in the history
  • Loading branch information
YenchangChan committed Apr 17, 2024
1 parent fd3c332 commit aca7950
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/clickhouse_sinker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,9 @@ func main() {
// cmdOps.HTTPPort=0: let OS choose the listen port, and record the exact metrics URL to log.
httpPort := cmdOps.HTTPPort
if httpPort == 0 {
httpPort = util.GetSpareTCPPort(HttpPortBase)
httpPort = HttpPortBase
}
httpPort = util.GetSpareTCPPort(httpPort)

httpHost := cmdOps.HTTPHost
if httpHost == "" {
Expand Down

0 comments on commit aca7950

Please sign in to comment.