Fix: do not join the connection thread if it hasn't been started.

This commit is contained in:
Eelke Klein 2017-01-08 20:00:34 +01:00
parent 726d67bc30
commit 5e0b8578e2

View file

@ -16,8 +16,10 @@ void ASyncDBConnection::setupConnection(const std::string &connstring)
void ASyncDBConnection::closeConnection()
{
m_threadData.stop();
if (m_thread.joinable()) {
m_thread.join();
}
}
bool ASyncDBConnection::send(const std::string &command, on_result_callback on_result)
{