fix for headless client operation when terminated via SIGNAL

This commit is contained in:
Volker Fischer 2020-06-11 12:26:37 +02:00
parent 897646d128
commit cf7d297663

View file

@ -665,6 +665,12 @@ void CClient::OnHandledSignal ( int sigNum )
{
case SIGINT:
case SIGTERM:
// if connected, terminate connection (needed for headless mode)
if ( IsRunning() )
{
Stop();
}
// this should trigger OnAboutToQuit
QCoreApplication::instance()->exit();
break;