Fix: do not join the connection thread if it hasn't been started.
This commit is contained in:
parent
726d67bc30
commit
5e0b8578e2
1 changed files with 3 additions and 1 deletions
|
|
@ -16,8 +16,10 @@ void ASyncDBConnection::setupConnection(const std::string &connstring)
|
||||||
void ASyncDBConnection::closeConnection()
|
void ASyncDBConnection::closeConnection()
|
||||||
{
|
{
|
||||||
m_threadData.stop();
|
m_threadData.stop();
|
||||||
|
if (m_thread.joinable()) {
|
||||||
m_thread.join();
|
m_thread.join();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool ASyncDBConnection::send(const std::string &command, on_result_callback on_result)
|
bool ASyncDBConnection::send(const std::string &command, on_result_callback on_result)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue