Set deadline for custom UDP/TCP conn

Otherwise, OS resolver may hang forever if the server does not reply.

While at it, also removing unused method stopClientInfoDiscover.

Updates #344
This commit is contained in:
Cuong Manh Le authored and Cuong Manh Le committed 2025-02-06 15:40:48 +07:00
1 parent cf6d16b439
commit 1c50c2b6af
2 files changed
+2 -7

No files matched your search

-7
View File
@@ -581,13 +581,6 @@ func (p *prog) runClientInfoDiscover(ctx context.Context) {
}()
}
// stopClientInfoDiscover stops the current client info discover goroutine.
// It blocks until the goroutine terminated.
func (p *prog) stopClientInfoDiscover() {
p.ciTable.Stop()
mainLog.Load().Debug().Msg("stopped client info discover")
}
// metricsEnabled reports whether prometheus exporter is enabled/disabled.
func (p *prog) metricsEnabled() bool {
return p.cfg.Service.MetricsQueryStats || p.cfg.Service.MetricsListener != ""