diff --git a/cmd/vroom/utils.go b/cmd/vroom/utils.go index 72d2674..5aa1004 100644 --- a/cmd/vroom/utils.go +++ b/cmd/vroom/utils.go @@ -4,8 +4,10 @@ import ( "crypto/tls" "crypto/x509" "log" + "net" "os" "strings" + "time" "github.com/segmentio/kafka-go" "github.com/segmentio/kafka-go/sasl" @@ -81,5 +83,9 @@ func createKafkaRoundTripper(e ServiceConfig) kafka.RoundTripper { return &kafka.Transport{ SASL: saslMechanism, TLS: tlsConfig, + Dial: (&net.Dialer{ + Timeout: 3 * time.Second, + DualStack: true, + }).DialContext, } -} \ No newline at end of file +}