1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Term deadlocked threads on exit

To prevent deadlocking the whole thing when we really just want to exit

Qt w/ pulseaudio can deadlock internally on call start if it fails to connect to the PA context. Awesome.
This commit is contained in:
Tux3 / Mlkj / !Lev.uXFMLA 2014-08-28 13:09:26 +02:00
parent c657296535
commit 8602327d16

View File

@ -219,7 +219,9 @@ Widget::~Widget()
core->saveConfiguration();
instance = nullptr;
coreThread->exit();
coreThread->wait();
coreThread->wait(500); // In case of deadlock (can happen with QtAudio/PA bugs)
if (!coreThread->isFinished())
coreThread->terminate();
delete core;
delete camview;