From cf7d297663e2c57ec6c87796546c1e480571f115 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Thu, 11 Jun 2020 12:26:37 +0200 Subject: [PATCH] fix for headless client operation when terminated via SIGNAL --- src/client.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/client.cpp b/src/client.cpp index 3c39ef2a..10d3afac 100755 --- a/src/client.cpp +++ b/src/client.cpp @@ -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;