summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorliuxueli <[email protected]>2022-02-25 18:08:50 +0800
committerliuxueli <[email protected]>2022-02-25 18:08:50 +0800
commit28782d2cd8123d87ec7813bbc67caf28486359c4 (patch)
tree8c59d678ca9875bce9cc895421e4bcb1994f2a71 /src
parent6724ab16f5077da10f80b9537758f2a1ccf10fec (diff)
TSG-9700: TSG_MASTER_UNLOAD使用错误的判断条件导致未销毁kakfa句柄,退出释放资源时引起段错误v5.5.8
Diffstat (limited to 'src')
-rw-r--r--src/tsg_send_log.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tsg_send_log.cpp b/src/tsg_send_log.cpp
index 91993ec..314c1ee 100644
--- a/src/tsg_send_log.cpp
+++ b/src/tsg_send_log.cpp
@@ -1655,7 +1655,7 @@ void tsg_sendlog_destroy(struct tsg_log_instance_t * instance)
return ;
}
- if(instance->mode==CLOSE)
+ if(instance->mode!=CLOSE)
{
for(int i=0; i<instance->max_service; i++)
{
@@ -1667,8 +1667,8 @@ void tsg_sendlog_destroy(struct tsg_log_instance_t * instance)
rd_kafka_topic_destroy(instance->topic_rkt[i]);
}
- //rd_kafka_destroy_flags(instance->kafka_handle, 4);
- //rd_kafka_destroy(instance->kafka_handle);
+ rd_kafka_destroy_flags(instance->kafka_handle, 4);
+ rd_kafka_destroy(instance->kafka_handle);
free(instance->topic_rkt);
instance->topic_rkt=NULL;