Skip to content

Commit

Permalink
Correctly cleanup auth db connection on thread finished
Browse files Browse the repository at this point in the history
(doesn't fix the invalid connection issue!)
  • Loading branch information
nyalldawson committed Nov 1, 2018
1 parent ac781fa commit 368286f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/auth/qgsauthmanager.cpp
Expand Up @@ -127,7 +127,7 @@ QSqlDatabase QgsAuthManager::authDatabaseConnection() const
if ( QThread::currentThread() != QgsApplication::instance()->thread() )
{
QgsDebugMsgLevel( QStringLiteral( "Scheduled auth db remove on thread close" ), 0 );
connect( QThread::currentThread(), &QThread::finished, QThread::currentThread(), [connectionName]
connect( QThread::currentThread(), &QThread::finished, this, [connectionName]
{
QgsDebugMsgLevel( QStringLiteral( "Removing outdated connection to %1 on thread exit" ).arg( connectionName ), 0 );
QSqlDatabase::removeDatabase( connectionName );
Expand Down

0 comments on commit 368286f

Please sign in to comment.