mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-03 02:42:19 +08:00
fix: fix the kafka of tls is nil problem
This commit is contained in:
parent
e3846cabf6
commit
edff36bbcd
@ -187,13 +187,16 @@ func checkKafka(config *config.GlobalConfig) error {
|
||||
}
|
||||
}
|
||||
|
||||
tlsConfig := &kafka.TLSConfig{
|
||||
var tlsConfig *kafka.TLSConfig
|
||||
if config.Kafka.TLS != nil {
|
||||
tlsConfig = &kafka.TLSConfig{
|
||||
CACrt: config.Kafka.TLS.CACrt,
|
||||
ClientCrt: config.Kafka.TLS.ClientCrt,
|
||||
ClientKey: config.Kafka.TLS.ClientKey,
|
||||
ClientKeyPwd: config.Kafka.TLS.ClientKeyPwd,
|
||||
InsecureSkipVerify: config.Kafka.TLS.InsecureSkipVerify,
|
||||
}
|
||||
}
|
||||
|
||||
_, err = kafka.NewMConsumerGroup(&kafka.MConsumerGroupConfig{
|
||||
KafkaVersion: sarama.V2_0_0_0,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user