mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
synced 2025-11-20 11:44:49 +00:00
Avoid SIGSEGV during destructing KafkaHandleBase (with set_log_callback()) (#68)
Configuration should exist for logging, since it contains the copy of the callback.
This commit is contained in:
committed by
Matias Fontanini
parent
ae74814791
commit
2451c74c4f
@@ -217,11 +217,11 @@ private:
|
||||
std::vector<GroupInformation> fetch_consumer_groups(const char* name);
|
||||
void save_topic_config(const std::string& topic_name, TopicConfiguration config);
|
||||
|
||||
HandlePtr handle_;
|
||||
std::chrono::milliseconds timeout_ms_;
|
||||
Configuration config_;
|
||||
TopicConfigurationMap topic_configurations_;
|
||||
std::mutex topic_configurations_mutex_;
|
||||
HandlePtr handle_;
|
||||
};
|
||||
|
||||
} // cppkafka
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace cppkafka {
|
||||
const milliseconds KafkaHandleBase::DEFAULT_TIMEOUT{1000};
|
||||
|
||||
KafkaHandleBase::KafkaHandleBase(Configuration config)
|
||||
: handle_(nullptr, nullptr), timeout_ms_(DEFAULT_TIMEOUT), config_(move(config)) {
|
||||
: timeout_ms_(DEFAULT_TIMEOUT), config_(move(config)), handle_(nullptr, nullptr) {
|
||||
auto& maybe_config = config_.get_default_topic_configuration();
|
||||
if (maybe_config) {
|
||||
maybe_config->set_as_opaque();
|
||||
|
||||
Reference in New Issue
Block a user