1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-23 01:09:42 +01:00

Show some debug output if we forcefully kill external resolvers

This commit is contained in:
Leo Franchi 2012-04-27 19:39:33 -04:00
parent 4a510b436b
commit 7b901c18a9

View File

@ -69,15 +69,19 @@ ScriptResolver::~ScriptResolver()
msg[ "_msgtype" ] = "quit";
sendMessage( msg );
m_proc.waitForFinished( 2000 ); // might call handleMsg
bool finished = m_proc.waitForFinished( 2500 ); // might call handleMsg
Tomahawk::Pipeline::instance()->removeResolver( this );
if ( !finished || m_proc.state() == QProcess::Running )
{
qDebug() << "External resolver didn't exit after waiting 2s for it to die, killing forcefully";
#ifdef Q_OS_WIN
m_proc.kill();
m_proc.kill();
#else
m_proc.terminate();
m_proc.terminate();
#endif
}
if ( !m_configWidget.isNull() )
delete m_configWidget.data();