removed unnecessary check for thread's joinability

This commit is contained in:
Yakov Olkhovskiy 2023-05-09 19:43:39 +00:00
parent 70516f2f45
commit 815cc8de9b

View File

@ -44,8 +44,6 @@ void TraceCollector::tryClosePipe()
TraceCollector::~TraceCollector()
{
try
{
if (thread.joinable())
{
/** Sends TraceCollector stop message
*
@ -57,9 +55,6 @@ TraceCollector::~TraceCollector()
writeChar(true, out);
out.next();
}
else
LOG_ERROR(&Poco::Logger::get("TraceCollector"), "TraceCollector thread is malformed and cannot be joined");
}
catch (...)
{
tryLogCurrentException("TraceCollector");
@ -69,6 +64,8 @@ TraceCollector::~TraceCollector()
if (thread.joinable())
thread.join();
else
LOG_ERROR(&Poco::Logger::get("TraceCollector"), "TraceCollector thread is malformed and cannot be joined");
}