diff --git a/asyncdbconnection.cpp b/asyncdbconnection.cpp index bddd1a6..c2e64f6 100644 --- a/asyncdbconnection.cpp +++ b/asyncdbconnection.cpp @@ -16,7 +16,9 @@ void ASyncDBConnection::setupConnection(const std::string &connstring) void ASyncDBConnection::closeConnection() { m_threadData.stop(); - m_thread.join(); + if (m_thread.joinable()) { + m_thread.join(); + } } bool ASyncDBConnection::send(const std::string &command, on_result_callback on_result)