From d6793b005448f18a2f019dcc2936dafcb6f4cac3 Mon Sep 17 00:00:00 2001 From: Adrian Preston Date: Mon, 7 Aug 2023 13:35:14 +0100 Subject: [PATCH] fix: avoid logging value of proxy.Dialer If Go's logging implementation is plugged into Sarama then it will introspect the contents of the Dialer, potentially giving rise to concurrent access to a map used to implement the dialer. Fixes #2547 Signed-off-by: Adrian Preston --- config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.go b/config.go index 19241e2e6..4876d8fbf 100644 --- a/config.go +++ b/config.go @@ -856,7 +856,7 @@ func (c *Config) Validate() error { func (c *Config) getDialer() proxy.Dialer { if c.Net.Proxy.Enable { - Logger.Printf("using proxy %s", c.Net.Proxy.Dialer) + Logger.Println("using proxy") return c.Net.Proxy.Dialer } else { return &net.Dialer{