Skip to content

Commit

Permalink
fix: avoid logging value of proxy.Dialer
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
prestona authored and dnwe committed Aug 7, 2023
1 parent 76ca69a commit 09c8186
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit 09c8186

Please sign in to comment.