mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Merge pull request #44948 from ClickHouse/fix-TraceCollector-fix
Fix exception fix in TraceCollector dtor
This commit is contained in:
commit
9f8b0bf149
@ -31,18 +31,20 @@ TraceCollector::TraceCollector(std::shared_ptr<TraceLog> trace_log_)
|
||||
|
||||
|
||||
TraceCollector::~TraceCollector()
|
||||
try
|
||||
{
|
||||
if (!thread.joinable())
|
||||
LOG_ERROR(&Poco::Logger::get("TraceCollector"), "TraceCollector thread is malformed and cannot be joined");
|
||||
else
|
||||
stop();
|
||||
try
|
||||
{
|
||||
if (!thread.joinable())
|
||||
LOG_ERROR(&Poco::Logger::get("TraceCollector"), "TraceCollector thread is malformed and cannot be joined");
|
||||
else
|
||||
stop();
|
||||
|
||||
TraceSender::pipe.close();
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
tryLogCurrentException("TraceCollector");
|
||||
TraceSender::pipe.close();
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
tryLogCurrentException("TraceCollector");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user