Skip to content
Commit d1e40344 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖
Browse files

Fix SessionThread dtor timeout when destroying default Session

The default Session does not have any owner and is managed by QThreadStorage,
so it is only destroyed when QApplication is being destroyed. Because at
this point event loop is no longer running, SessionThread::doThreadQuit()
is not invoked from SessionThread dtor and we hit the 10 seconds timeout.

This affects especially unit-test which take less than second to execute,
but then get stuck for 10 seconds in the SessionThread dtor during
clean up.

Since the new code relies on QCoreApplication::aboutToQuit() to destroy
the default Sessions while qApp is still running we had to adjust
AKONADITEST_MAIN() a little to start the QApplication event loop, because
otherwise the signal is not emitted.
parent 0d8adb44
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment