From e7d2f5239dc796206f83812abc8d5c01d35b1d3e Mon Sep 17 00:00:00 2001 From: paspo Date: Fri, 3 Jul 2026 11:50:46 +0200 Subject: [PATCH] Move to above line 195. Avoid interrupt checking connPorts and using connPorts. As suggested by @shizunge --- main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index d3d2ac6..9da12a1 100644 --- a/main.go +++ b/main.go @@ -190,6 +190,9 @@ func main() { }) clients := startSending(*maxClients, *bannerMaxLength, records) + // Start the healthcheck listener. + health.StartListener(*healthcheckHost, *healthcheckPort) + interval := time.Duration(*intervalMs) * time.Millisecond // Listen for incoming connections. if *connType == "tcp6" && *connHost == "0.0.0.0" { @@ -198,7 +201,6 @@ func main() { if len(connPorts) == 0 { connPorts = append(connPorts, defaultPort) } - health.StartListener(*healthcheckHost, *healthcheckPort) for _, connPort := range connPorts { startAccepting(*maxClients, *connType, *connHost, connPort, interval, clients, records, *proxyProtocolEnabled, *proxyProtocolReadHeaderTimeout) }