Skip to content

Commit

Permalink
fix: Close leaked health check kafka producer (milvus-io#37728)
Browse files Browse the repository at this point in the history
Related to milvus-io#36822

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
  • Loading branch information
congqixia authored Nov 16, 2024
1 parent 3f7352f commit 4820dd7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/mq/msgstream/msgstream_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ func KafkaHealthCheck(clusterStatus *pcommon.MQClusterStatus) {
clusterStatus.Reason = fmt.Sprintf("failed to create Kafka producer: %v", err)
return
}
defer producer.Close()

metadata, err := producer.GetMetadata(nil, false, 3000)
if err != nil {
Expand Down

0 comments on commit 4820dd7

Please sign in to comment.